Problem exam
User spidermancoolboy
Submission Time 2024-01-27 23:35:22
Score 0
Max Time N/A
Max Memory N/A

Compile Error

exam.cpp:2:2: error: invalid preprocessing directive #using
2 | #using namespace std
| ^~~~~
exam.cpp: In function ‘int main()’:
exam.cpp:4:2: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
4 | cin>>num;
| ^~~
| std::cin
In file included from exam.cpp:1:
/usr/include/c++/9/iostream:60:18: note: ‘std::cin’ declared here
60 | extern istream cin; /// Linked to standard input
| ^~~
exam.cpp:4:7: error: ‘num’ was not declared in this scope; did you mean ‘enum’?
4 | cin>>num;
| ^~~
| enum
exam.cpp:5:6: error: ‘i’ was not declared in this scope
5 | if (i=1){
| ^
exam.cpp:6:3: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’?
6 | cout << "Hello World";
| ^~~~
| std::cout
In file included from exam.cpp:1:
/usr/include/c++/9/iostream:61:18