foo.cc: In function 'int main()':
foo.cc:10:8: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
10 | gets(a);
| ^
In file included from /usr/include/stdio.h:867,
from /usr/include/c++/9/cstdio:42,
from foo.cc:2:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
235 | gets (char *__str)
| ^~~~
foo.cc:10:8: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
10 | gets(a);
| ^
In file included from /usr/include/stdio.h:867,
from /usr/include/c++/9/cstdio:42,
from foo.cc:2:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
235 | gets (char *__str)
| ^~~~
foo.cc:22:2: error: 'cout' was not declared in this scope
22 | cout<<a;
| ^~~~
foo.cc:4:1: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
3 | #include <cstring>
+++ |+#include <iostream>
4 | using namespace std;
foo.cc:10:6: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result]
10 | gets(a);
| ~~~~^~~
[Hydro](https://hydro.ac)提供评测服务