Problem | helloworld |
---|---|
User | aj |
Submission Time | 2024-09-04 13:17:21 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
helloworld.cpp:3:5: error: cannot declare ‘::main’ to be a global variable
3 | int main{
| ^~~~
helloworld.cpp:4:2: error: ‘cout’ was not declared in this scope
4 | cout<<"Hello World";
| ^~~~
helloworld.cpp:2:1: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
1 | #include <stdio.h>
+++ |+#include <iostream>
2 | using namespace std;
helloworld.cpp:4:21: error: expected ‘}’ before ‘;’ token
4 | cout<<"Hello World";
| ^
helloworld.cpp:3:9: note: to match this ‘{’
3 | int main{
| ^
helloworld.cpp:5:1: error: expected declaration before ‘}’ token
5 | }
| ^