RoD, I would say that her "fix" is the least good of the ones I've seen here. It most certainly ain't the standard way of doing it. The cleanest, most standard and best way do do it would be (as others have already pointed out) while(infile >> data) {...}or while(!infile.eof()) { infile >> data; ...}. In other words, don't listen to her.