记录详情

Compile Error

foo.c: In function 'main':
foo.c:7:5: warning: 'gets' is deprecated [-Wdeprecated-declarations]
    7 |     gets(s);
      |     ^~~~
In file included from foo.c:1:
/nix/store/y8wfrgk7br5rfz4221lfb9v8w3n0cnyd-glibc-2.37-8-dev/include/stdio.h:605:14: note: declared here
  605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
      |              ^~~~
foo.c:18:35: error: 's_len' undeclared (first use in this function); did you mean 'len'?
   18 |     memmove(&s[si], &s[si + len], s_len - si - len + 1);
      |                                   ^~~~~
      |                                   len
foo.c:18:35: note: each undeclared identifier is reported only once for each function it appears in
foo.c:9:9: warning: unused variable 'n' [-Wunused-variable]
    9 |     int n = strlen(s);
      |         ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P1063 A8-7 删除字符串中一个子串
语言
C
递交时间
2023-11-11 15:37:21
评测时间
2023-11-11 15:37:21
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes