记录详情

Compile Error

foo.c: In function 'main':
foo.c:5:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=]
    5 | scanf("%s");
      |        ~^
      |         |
      |         char *
foo.c:8:9: error: expected ',' or ';' before 'char'
    8 |         char sub_str[]="vyou50forKFCcrazyThursday"
      |         ^~~~
foo.c:11:9: error: 'result' undeclared (first use in this function)
   11 |         result=strstr(str,sub_str)
      |         ^~~~~~
foo.c:11:9: note: each undeclared identifier is reported only once for each function it appears in
foo.c:11:16: warning: implicit declaration of function 'strstr' [-Wimplicit-function-declaration]
   11 |         result=strstr(str,sub_str)
      |                ^~~~~~
foo.c:3:1: note: include '<string.h>' or provide a declaration of 'strstr'
    2 | #include <math.h>
  +++ |+#include <string.h>
    3 | int main()
foo.c:11:16: warning: incompatible implicit declaration of built-in function 'strstr' [-Wbuiltin-declaration-mismatch]
   11 |         result=strstr(str,sub_str)
      |                ^~~~~~
foo.c:11:16: note: include '<string.h>' or provide a declaration of 'strstr'
foo.c:11:27: error: 'sub_str' undeclared (first use in this function)
   11 |         result=strstr(str,sub_str)
      |                           ^~~~~~~
foo.c:11:35: error: expected ';' before 'if'
   11 |         result=strstr(str,sub_str)
      |                                   ^
      |                                   ;
   12 | 
   13 |         if(result==NULL)
      |         ~~                         
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1489 C. 小季的密文
比赛
2023年新生赛(第三场)
语言
C
递交时间
2023-09-09 21:21:24
评测时间
2023-09-09 21:21:24
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes