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