记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:11:19: error: 'strlen' was not declared in this scope
   11 |         if (si <= strlen(s))
      |                   ^~~~~~
foo.cc:2:1: note: 'strlen' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
foo.cc:34:30: error: 'strlen' was not declared in this scope
   34 |         for (long j = 0; j < strlen(s); j++)
      |                              ^~~~~~
foo.cc:34:30: note: 'strlen' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
foo.cc:7:15: warning: unused variable 'S' [-Wunused-variable]
    7 |         char* S = s;
      |               ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1063 A8-7 删除字符串中一个子串
比赛
2023 程序设计与竞赛(作业7:最初的综合)
语言
C++
递交时间
2023-11-11 19:09:18
评测时间
2023-11-11 19:09:18
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes