foo.cc:3:5: error: cannot declare '::main' to be a global variable
int main
^~~~
foo.cc:5:2: error: expected primary-expression before 'int'
int a,b;
^~~
foo.cc:5:2: error: expected '}' before 'int'
foo.cc:6:2: error: 'cin' does not name a type; did you mean 'main'?
cin>>a>>b;
^~~
main
foo.cc:7:2: error: 'cout' does not name a type
cout<<a+b<<endl;
^~~~
foo.cc:8:2: error: expected unqualified-id before 'return'
return 0;
^~~~~~
foo.cc:9:1: error: expected declaration before '}' token
}
^
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。