Main.cc: In function ‘int main()’: Main.cc:12:6: error: redeclaration of ‘int a’ int a=0; ^ Main.cc:5:6: note: ‘int a’ previously declared here int a=0; ^