foo.cc: In function 'int main()':
foo.cc:7:5: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
7 | gets(s1);gets(s2);
| ~~~~^~~~
In file included from cstdio:42:
/nix/store/1x86jfiwsp5qi448fcdkkzn7vmx4krv2-glibc-2.35-163-dev/include/stdio.h:605:14: note: declared here
605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
| ^~~~
foo.cc:7:14: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
7 | gets(s1);gets(s2);
| ~~~~^~~~
In file included from cstdio:42:
/nix/store/1x86jfiwsp5qi448fcdkkzn7vmx4krv2-glibc-2.35-163-dev/include/stdio.h:605:14: note: declared here
605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
| ^~~~
foo.cc:8:37: warning: unused variable 'x' [-Wunused-variable]
8 | int i,j,l1=strlen(s1),l2=strlen(s2),x=0;
| ^
/nix/store/vhf2cr6immz4qdxd83y025fnxim8mmfg-binutils-2.38/bin/ld: /tmp/cc5qqexn.o: in function `main':
foo.cc:(.text.startup+0xc): warning: the `gets' function is dangerous and should not be used.
[Hydro](https://hydro.ac)提供评测服务