Main.cc: In function ‘int main()’: Main.cc:6:6: error: redeclaration of ‘int c’ int c=0; ^ Main.cc:4:10: note: ‘int c’ previously declared here int a,b,c; ^ Main.cc:7:14: error: ‘i’ was not declared in this scope for(int x=0;i<10000;x++){ ^