foo.cc: In function 'int main()':
foo.cc:14:9: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
14 | gets("%d%d",&n,&k);
| ~~~~^~~~~~~~~~~~~~
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:14:9: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
14 | gets("%d%d",&n,&k);
| ~~~~^~~~~~~~~~~~~~
/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:14:10: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
14 | gets("%d%d",&n,&k);
| ^~~~~~
foo.cc:14:9: error: too many arguments to function 'char* gets(char*)'
14 | gets("%d%d",&n,&k);
| ~~~~^~~~~~~~~~~~~~
/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:18:13: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
18 | gets("%d",&a[j]);
| ~~~~^~~~~~~~~~~~
/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:18:13: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
18 | gets("%d",&a[j]);
| ~~~~^~~~~~~~~~~~
/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:18:14: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
18 | gets("%d",&a[j]);
| ^~~~
foo.cc:18:13: error: too many arguments to function 'char* gets(char*)'
18 | gets("%d",&a[j]);
| ~~~~^~~~~~~~~~~~
/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:26:13: error: too many arguments to function 'int puts(const char*)'
26 | puts("%d ",m);
| ~~~~^~~~~~~~~
/nix/store/3w4yrspgcx1z9wi18rv0hbap4jjlhx4c-glibc-2.37-8-dev/include/stdio.h:661:12: note: declared here
661 | extern int puts (const char *__s);
| ^~~~
[Hydro](https://hydro.ac)提供评测服务