Main.cc: In function 'int main()': Main.cc:5:9: error: redeclaration of 'int c' int c=a+b; ^ Main.cc:4:13: note: 'int c' previously declared here int a,b,c; ^