foo.cc: In function 'int main()':
foo.cc:7:9: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
7 | gets(str);
| ~~~~^~~~~
In file included from foo.cc:1:
/nix/store/3w4yrspgcx1z9wi18rv0hbap4jjlhx4c-glibc-2.37-8-dev/include/stdio.h:605:14: note: declared here
605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
| ^~~~
foo.cc:10:19: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
10 | for (i = 0; i < strlen(str); i++)
| ~~^~~~~~~~~~~~~
/nix/store/j2gmfdd29cp3rcvghmn1a5kgcnmf8myp-binutils-2.40/bin/ld: /tmp/cc83inwB.o: in function `main':
foo.cc:(.text.startup+0x1c): warning: the `gets' function is dangerous and should not be used.
[Hydro](https://hydro.ac)提供评测服务