Problem | helloworld |
---|---|
User | xiaohaoxuan |
Submission Time | 2025-05-01 18:53:19 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
helloworld.cpp:1:5: error: cannot declare ‘::main’ to be a global variable
1 | int main{
| ^~~~
helloworld.cpp:2:7: error: ‘cout’ is not a member of ‘std’
2 | std::cout << "Hello World"
| ^~~~
helloworld.cpp:1:1: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
+++ |+#include <iostream>
1 | int main{
helloworld.cpp:3:2: error: expected ‘}’ before ‘return’
3 | return 0
| ^~~~~~
helloworld.cpp:1:9: note: to match this ‘{’
1 | int main{
| ^
helloworld.cpp:4:2: error: expected declaration before ‘}’ token
4 | }
| ^