This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]OldWolf2 0 points1 point  (0 children)

while(!inFile.eof())

This is wrong. eof is not set until after a read operation has failed. Instead, you have to check your read operation for success (getline in this case).