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)提供评测服务