Problem addition
User ryannbreaker
Submission Time 2024-02-14 18:44:07
Score 0
Max Time N/A
Max Memory N/A

Compile Error

addition.cpp:6:5: error: cannot declare ‘::main’ to be a global variable
6 | int main {
| ^~~~
addition.cpp:7:2: error: expected primary-expression before ‘int’
7 | int sum;
| ^~~
addition.cpp:7:2: error: expected ‘}’ before ‘int’
addition.cpp:6:10: note: to match this ‘{’
6 | int main {
| ^
addition.cpp:8:2: error: ‘sum’ does not name a type
8 | sum = add(4,5);
| ^~~
addition.cpp:9:2: error: ‘cout’ does not name a type
9 | cout << sum << endl;
| ^~~~
addition.cpp:10:2: error: expected unqualified-id before ‘return’
10 | return 0;
| ^~~~~~
addition.cpp:11:1: error: expected declaration before ‘}’ token
11 | }
| ^