You know that a for loop commonly looks like:
Code:
for (int i = 0; i < something; i++)
HOWEVER, a for loop is NOT limited to this. In fact, a for loop is not a limited syntax. A for loop looks like:
Code:
for (<declarations>; <condition>; <to do after each loop>)
So we can make loops such as:
Code:
for (int i = 0, j = 0; i < 0 && j > 0; i++, j--)
Or
Or even
I simply wanted to point this out. If you don't want to increase i or have more control over i each iterator, you are not limited to using a while loop. No, a for loop could still do fine.