Main.cc: In function 'int main()': Main.cc:8:9: error: redeclaration of 'int y' int y; ^ Main.cc:5:11: note: 'int y' previously declared here int x,y; ^