Reading from a file
As far as I'm aware, files (on modern operating systems) don't need or have an EOF marker. |
True. I was referring to file stream eof state.
the output from my program gave the correct number of lines (6 for that test file) when tested under Windows |
It depends upon whether there is a final '\n' or not in the file.
If the file has:
then no - it reports 5 lines.
If the file has:
then yes it reports 6 lines as expected.
Topic archived. No new replies allowed.