Main.cc: In function 'int main()': Main.cc:11:19: error: 'i' was not declared in this scope for(int j=0;a[i]!='\0';j++) ^