记录详情

Compile Error

foo.c: In function 'main':
foo.c:5:13: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'int' [-Wformat=]
    5 |     scanf("%s",a);
      |            ~^  ~
      |             |  |
      |             |  int
      |             char *
foo.c:6:12: warning: implicit declaration of function 'my_strchr' [-Wimplicit-function-declaration]
    6 |     char p=my_strchr(a,'vyou50forKFCcrazyThursday');
      |            ^~~~~~~~~
foo.c:6:24: warning: character constant too long for its type
    6 |     char p=my_strchr(a,'vyou50forKFCcrazyThursday');
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.c:7:9: warning: comparison between pointer and integer
    7 |     if(p==NULL)
      |         ^~
foo.c:5:5: warning: 'a' is used uninitialized [-Wuninitialized]
    5 |     scanf("%s",a);
      |     ^~~~~~~~~~~~~
foo.c:4:7: note: 'a' was declared here
    4 | {char a;
      |       ^
/nix/store/j2gmfdd29cp3rcvghmn1a5kgcnmf8myp-binutils-2.40/bin/ld: /tmp/ccuy38yq.o: in function `main':
foo.c:(.text.startup+0x1b): undefined reference to `my_strchr'
collect2: error: ld returned 1 exit status
[Hydro](https://hydro.ac)提供评测服务

信息

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