Why do I have to assign the integer out of the for loop?


I coded sometimes in c an another IDE and I’m used to do the for loop like this:

for(int i =0; i<n; i++)

or something like that. Now it tells me that it’s not allowed and I have to assign i before the loop, and it doesn’t even work when i assign it before the loop.
it tells me that a semicolon is required after the i++ and that’s irrational. And it doesn’t compile properly.
can anyone help me?


Please step back five or six steps and start from the beginning. None of us are able to see your computer screen, so we don’t know what any of those "it"s mean.

Atom has no ability to compile code. If you’re receiving an error message from the compiler, that message is very much not coming from Atom. If you’re receiving an error message from a package, you need to inform us about which package it is so that we know what’s going on.