Main.cc: In function 'int main()': Main.cc:19:7: error: expected primary-expression before 'int' fot(int i=cnt-1;i>=0;i--){ ^ Main.cc:19:19: error: 'i' was not declared in this scope fot(int i=cnt-1;i>=0;i--){ ^