Quote:
Originally Posted by DaWei
Sure, EOF is the issue. Your last read grabs the last line and newline. That is not EOF, since you haven't attempted to read beyond it. The "while (fin)" looks fine, so you attempt to read again and hit EOF. You aren't checking for that. This is one of most common novice mistakes.
|
Dawei, can I have some clarifications about what you are saying because I am not able to see what to modify.
Thank you
B