when I modify string or another variable inside the loop it's condition is recalculated each time? or once before the loop start
std::string a("aa"); do { a = "aaaa"; } while(a.size<10) and what about for loop when I modify string or another variable inside the loop it's condition is recalculated each time? or once before the loop start
std::string a("aa"); do { a = "aaaa"; } while(a.size<10) and what about for loop Every time. Basically it checks every time to see if the statement inside the conditional is true. If it is true, continue to loop, if it is false break the loop. That is why these constructs are called Conditional Loops
for(int i = 0; i < 5; i++) DoMyThing(); by unrolling it to DoMyThing(); DoMyThing(); DoMyThing(); DoMyThing(); DoMyThing();. But for all practical purposes assume every time.volatile.volatile in that manner is an old falsity. (You have a race condition, for example.)