Okay, the following loop has been taken from a book I am studying from:
My first question is regarding the condition while(true), does this basically mean that the loop qill continue until something explicitly states to exit the loop? In this case, the break statement? Or this could be triggered by returning something other than 1? Is that right?Code:
if(!(is >> m)) break;
y.month[m.month] = m;
Also, in this example, the >> operator has been overloaded to read from an istream, in this case a txt file. If there is nothing read then this will break the loop, however the statement below that does not appear to do anything with the input stream? There is nothing explicit within that loop to say read from a stream, yet I think thats what it implies? Any suggestions?