Main.cc: In function 'int main()': Main.cc:12:1: error: a function-definition is not allowed here before '{' token { int a; cin>>a; ^ Main.cc:30:1: error: expected '}' at end of input } ^