Main.cc:4:1: error: expected unqualified-id before ‘int’ int sum,a[105]; ^~~ Main.cc: In function ‘void print()’: Main.cc:8:2: error: ‘sum’ was not declared in this scope sum++ ^~~ Main.cc:18:1: error: a function-definition is not allowed here before ‘{’ token { ^ Main.cc:28:10: error: expected initializer at end of input int main() ^ Main.cc:28:10: error: expected ‘}’ at end of input