Problem helloworld
User Mirage
Submission Time 2023-01-04 15:24:11
Score 0
Max Time N/A
Max Memory N/A

Compile Error

helloworld.cpp:4:5: error: cannot declare ‘::main’ to be a global variable
4 | int main {
| ^~~~
helloworld.cpp:5:2: error: ‘cout’ was not declared in this scope
5 | cout << "Hello World";
| ^~~~
helloworld.cpp:1:1: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
+++ |+#include <iostream>
1 |
helloworld.cpp:5:23: error: expected ‘}’ before ‘;’ token
5 | cout << "Hello World";
| ^
helloworld.cpp:4:10: note: to match this ‘{’
4 | int main {
| ^
helloworld.cpp:6:1: error: expected declaration before ‘}’ token
6 | }
| ^