Main.cc: In function 'int main()': Main.cc:7:2: error: expected ';' before 'for' for (int x = 1;x <= m - 1;x++){ ^ Main.cc:7:17: error: 'x' was not declared in this scope for (int x = 1;x <= m - 1;x++){ ^