Main.cc: In function 'int main()': Main.cc:8:6: error: redeclaration of 'int c' int c=strlen(b); ^ Main.cc:7:6: note: 'int c' previously declared here int c=strlen(a); ^