[c++] replacing "for" with "while" loop

Posted by Temporary_Session_60@reddit | learnprogramming | View on Reddit | 39 comments

I've been trying to replace my "for" loops with "while", but every time I have to create a new variable to keep track of when to stop in the while loop, which makes it clunky when using the variable, and sometimes makes naming variables harder for me. Is there a way to still use variable but a local one for each while loop?