this way the loop will still continue once after the last line was already read because EOF will only be set if a read operation fails.Code:while(File) {
That's why you process the last line twice.
Kurt
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 4 of 4
Thread: How to flush an fstream?Threaded View
Tags for this Thread |
Click Here to Expand Forum to Full Width |