- Joined
- May 22, 2012
- Messages
- 116,745
- Reaction score
- 82,083
- Location
- Uhland, Texas
- Gender
- Male
- Political Leaning
- Libertarian
That's only for the "for" loop, I don't think that's the case for the "while" loop.
But I may be wrong.
That is generally correct. Do while/until loops generally require separate "programmer" control of the test (loop control) variable value. What gets so tricky in C++ is variable scope, many use far too many global variables and pick lousy (duplicate) names for them at that. I prefer more programmer friendly languages like Turbo Pascal or, better yet, Ada.

Last edited: