记录详情

Compile Error

foo.c: In function 'main':
foo.c:24:21: warning: implicit declaration of function 'strrev'; did you mean 'strlen'? [-Wimplicit-function-declaration]
   24 |     int xmin = atoi(strrev(str));
      |                     ^~~~~~
      |                     strlen
foo.c:24:21: warning: passing argument 1 of 'atoi' makes pointer from integer without a cast [-Wint-conversion]
   24 |     int xmin = atoi(strrev(str));
      |                     ^~~~~~~~~~~
      |                     |
      |                     int
In file included from /nix/store/y8wfrgk7br5rfz4221lfb9v8w3n0cnyd-glibc-2.37-8-dev/include/features.h:491,
                 from /nix/store/y8wfrgk7br5rfz4221lfb9v8w3n0cnyd-glibc-2.37-8-dev/include/bits/libc-header-start.h:33,
                 from /nix/store/y8wfrgk7br5rfz4221lfb9v8w3n0cnyd-glibc-2.37-8-dev/include/stdio.h:27,
                 from foo.c:1:
/nix/store/y8wfrgk7br5rfz4221lfb9v8w3n0cnyd-glibc-2.37-8-dev/include/stdlib.h:362:1: note: expected 'const char *' but argument is of type 'int'
  362 | __NTH (atoi (const char *__nptr))
      | ^~~~~
/nix/store/74y3751gsixaz9797ib0hp7c658sp1y5-binutils-2.40/bin/ld: /tmp/ccXRfbzL.o: in function `main':
foo.c:(.text.startup+0x65): undefined reference to `strrev'
collect2: error: ld returned 1 exit status
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
5-7 玩整数
比赛
2023 程序设计与竞赛(作业7:最初的综合)
语言
C
递交时间
2023-11-11 20:22:08
评测时间
2023-11-11 20:22:08
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes