foo.cc: In function 'int main()':
foo.cc:6:8: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
gets(s);
^
In file included from /usr/include/stdio.h:862:0,
from /usr/include/c++/7/cstdio:42,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:46,
from foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:232:1: note: declared here
gets (char *__str)
^~~~
foo.cc:9:2: error: 'cout' was not declared in this scope
cout<<a;
^~~~
foo.cc:9:2: note: suggested alternative:
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:75:0,
from foo.cc:1:
/usr/include/c++/7/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^~~~
foo.cc:6:6: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result]
gets(s);
~~~~^~~
[Hydro](https://hydro.ac)提供评测服务