From: Brad King (brad.king_at_[hidden])
Date: 2001-10-29 09:31:26
> > When you use getline, either from an istream or a string, how do you know if
> > the line ended from a line break or an EOF?
> Call stream.eof(). If it returns true, the line ended from an EOF, if false,
> from a line break.
22.214.171.124/22 Gives an example of how to distinguish these cases:
- End of file.
- End of file, last line had no newline.
- Line partially read, buffer is full.
- Newline encountered.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk