Problem helloworld
User mingze
Submission Time 2026-06-22 16:05:34
Score 0
Max Time N/A
Max Memory N/A

Compile Error

helloworld.cpp: In function ‘int main()’:
helloworld.cpp:6:1: error: ‘cout’ was not declared in this scope
6 | cout << "Hello World"
| ^~~~
helloworld.cpp:1:1: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
+++ |+#include <iostream>
1 |
In file included from /usr/include/c++/9/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:33,
from helloworld.cpp:7:
/usr/include/x86_64-linux-gnu/c++/9/bits/c++config.h:278:1: error: ‘namespace’ definition is not allowed here
278 | namespace std
| ^~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/c++config.h:282:1: error: ‘namespace’ definition is not allowed here
282 | namespace __gnu_cxx
| ^~~~~~~~~
In file included from /usr/include/features.h:461,
from /usr/include/x86_64-linux-gnu/c++/9/bits/os_defines.h:39,