记录详情

Compile Error

foo.cc: In function 'bool Comapre(char*, char*, int)':
foo.cc:7:29: error: 'strlen' was not declared in this scope
    7 |         for (int j = 0; j < strlen(t); j++)
      |                             ^~~~~~
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>
foo.cc: In function 'void Delete(char*, int)':
foo.cc:15:20: error: 'strlen' was not declared in this scope
   15 |         for (; j < strlen(s) - 1; j++)
      |                    ^~~~~~
foo.cc:15:20: note: 'strlen' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
foo.cc: In function 'void Insert(char*, int, char)':
foo.cc:21:11: error: 'strlen' was not declared in this scope
   21 |         s[strlen(s)] = s[strlen(s) - 1];
      |           ^~~~~~
foo.cc:21:11: note: 'strlen' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
foo.cc: In function 'int main()':
foo.cc:35:31: error: 'strlen' was not declared in this scope
   35 |         for (int i = 0; i <= (strlen(s) - strlen(t1) + 1); )
      |                               ^~~~~~
foo.cc:35:31: note: 'strlen' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
foo.cc:48:29: error: 'strlen' was not declared in this scope
   48 |         for (int i = 0; i < strlen(s); i++)
      |                             ^~~~~~
foo.cc:48:29: note: 'strlen' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1052 OO11-4 string中的查找替换
语言
C++
递交时间
2023-06-20 11:22:57
评测时间
2023-06-20 11:22:57
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes