/ OPS /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:8:20: error: 'strlen' was not declared in this scope
    8 |   int x = 0, str = strlen(a), y = 0, stp = strlen(b);
      |                    ^~~~~~
/in/foo.cc:2:1: note: 'strlen' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
/in/foo.cc:10:21: error: 'stp' was not declared in this scope; did you mean 'str'?
   10 |   while (x <= str - stp) {
      |                     ^~~
      |                     str
/in/foo.cc:11:18: error: 'y' was not declared in this scope
   11 |    if (a[x] == b[y]) {
      |                  ^

信息

递交者
类型
递交
题目
P1062 找子串
语言
C++
递交时间
2024-03-21 20:04:50
评测时间
2024-03-21 20:04:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes