That is exactly what it does. Take this code:
Originally Posted by darren78
Now let's break it into separate lines:
if(!(is >> m)) break;
This is also essentially the same as
istream& file = is >> m; // The >> operator returns the stream itself, is.
if (!file) break; // If we were unable to extract the data from the file into m, the file will be marked as "bad".
The is >> m extracts the month from the file, if there is one. We know that because m is a month.
is >> m;
if (!is) break;