c++ - Control flow does not enter loop, how is this possible? -


  if (true) {     std::cout << "1" << std::endl;     (int = 1; >= 16; i++) {       std::cout << "2:" << << std::endl;     }   } 

output:

1 

i utterly confused , out of ideas, advice appreciated.

your loop's condition is: i >= 16;

you said loop while i greater or equal 16. never is, because you've initialized 1.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -