Problem trivialexam_ex_ex
User ecxx
Submission Time 2023-04-04 21:46:56
Score 0

Compile Error

trivialexam_ex_ex.cpp: In function ‘int main()’:
trivialexam_ex_ex.cpp:5:2: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
5 | cin >> n;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:75,
from trivialexam_ex_ex.cpp:1:
/usr/include/c++/9/iostream:60:18: note: ‘std::cin’ declared here
60 | extern istream cin; /// Linked to standard input
| ^~~
trivialexam_ex_ex.cpp:6:2: error: ‘string’ was not declared in this scope
6 | string s = "01111111111111111111111111";
| ^~~~~~
trivialexam_ex_ex.cpp:6:2: note: suggested alternatives:
In file included from /usr/include/c++/9/iosfwd:39,
from /usr/include/c++/9/ios:38,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,