foo.cc:3:5: error: cannot declare '::main' to be a global variable
3 | int main
| ^~~~
foo.cc:5:9: error: expected primary-expression before 'int'
5 | int a,b;
| ^~~
foo.cc:5:9: error: expected '}' before 'int'
foo.cc:4:1: note: to match this '{'
4 | {
| ^
foo.cc:6:9: error: 'cin' does not name a type
6 | cin>>a>>b;
| ^~~
foo.cc:7:9: error: 'cout' does not name a type
7 | cout<<a+b;
| ^~~~
foo.cc:8:9: error: expected unqualified-id before 'return'
8 | return 0;
| ^~~~~~
foo.cc:9:1: error: expected declaration before '}' token
9 | }
| ^
[Hydro](https://hydro.ac)提供评测服务