0

Possible Duplicate:
How to know if the next character is EOF in C++

I want to find out whether or not some istream has reached to the end of file.

Something like

if (my_istream.peek() == EOF) {...}

The documentation advice to use traits::eof(). How do I do that? I don't understand.

Community
  • 1
  • 1
Chi-Lan
  • 3,575
  • 3
  • 22
  • 24

0 Answers0