Main.cc: In function 'int main()': Main.cc:11:5: error: expected ',' or ';' before 'for' for(int i=0;i<=j;i++) ^ Main.cc:11:17: error: 'i' was not declared in this scope for(int i=0;i<=j;i++) ^