I am receiving this error in XCode 6.3.2:
Loop will run at most once (loop increment never executed)
I have tried for (int
Move this line:
return 0;
It will end the loop (function as well as program!).
I tried two different compilers (Windows/MSVC and Linux/g++) ... and I don't get that warning.
However - you're doing a "return 0" from your loop.
Which, of course, defeats the purpose of having a loop :)
And also happens to terminate your program.
Move the "return" outside of the loop, and Life should be Good :)