Main.cc: In function 'int main()': Main.cc:5:12: error: redeclaration of 'int n' int n=0,m,n; ^ Main.cc:5:6: note: 'int n' previously declared here int n=0,m,n; ^ Main.cc:5:10: warning: unused variable 'm' [-Wunused-variable] int n=0,m,n; ^