Please help me understand the theory of this. I need to read each word in a text file (StudentFile is the ofstream object) and assign it to a structure array. I can not use a vector
> while (StudentFile >> FirstName >> LastName >> StudentId >> NumberOfGrades)
> would this while statement keep looping until the eof
It will keep looping until the attempted input fails, which may be caused by:
a. badly formed input - for instance, non-numeric characters where a number is expected
b. end of file - there is nothing more to read
c. any other kind of input failure - for instance, the file is on removable media which was forcibly unmounted.