Hello,
I have a quick question about the bool from an example code in a book about c++ that i'm reading.
Here, the bool is set as 'done = false', however in the while statement it says 'while (!done)' which means if true then do the following (?) I think. And in order to get out of the loop you need to enter 999 which makes 'done = (input == 999)' which in turn would make done equal to true.
What i'm wondering is how does this not loop infinitely? Since the while loop executes when done is true, then how could you get out of the loop when done also equals true inside of the while loop?
Maybe i'm missing something really obvious or i'm thinking about it wrong and if somebody could explain I would be really grateful.