foo.cc: In function 'int main()':
foo.cc:7:13: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
7 | gets(a);
| ~~~~^~~
In file included from /nix/store/hf2gy3km07d5m0p1lwmja0rg9wlnmyr7-gcc-12.3.0/include/c++/12.3.0/cstdio:42,
from stdc++.h:46:
/nix/store/mrgib0s2ayr81xv1q84xsjg8ijybalq3-glibc-2.38-27-dev/include/stdio.h:663:14: note: declared here
663 | extern char *gets (char *__s) __wur __attribute_deprecated__;
| ^~~~
foo.cc:8:13: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
8 | gets(b);
| ~~~~^~~
/nix/store/mrgib0s2ayr81xv1q84xsjg8ijybalq3-glibc-2.38-27-dev/include/stdio.h:663:14: note: declared here
663 | extern char *gets (char *__s) __wur __attribute_deprecated__;
| ^~~~
/nix/store/1fn92b0783crypjcxvdv6ycmvi27by0j-binutils-2.40/bin/ld: /tmp/ccnMng2V.o: in function `main':
foo.cc:(.text.startup+0xd): warning: the `gets' function is dangerous and should not be used.
[Hydro](https://hydro.ac)提供评测服务