"James Kanze" <ja*********@gmail.comwrote in message
news:11**********************@b79g2000hse.googlegr oups.com...
On Jul 26, 3:58 am, "Peter Olcott" <NoS...@SeeScreen.com>
wrote:
"Jim Langston" <tazmas...@rocketmail.comwrote in message
news:kc************@newsfe03.lga...
[...]
if ( std::getline( Input, Data ) )
Yes this is what I was talking about, I need text
delimited
by lines.
What is the "if" for ???
To test whether the input succeeded or not. std::getline
(like
the << operators) returns a reference to the stream it read;
when used in a condition, the stream will act true if there
has
been no error to date, and false if there was some sort of
error
(typically, in this case, due to trying to read beyond the
end
of file).
So it would typically be written like this?
while ( std::getline( Input, Data ) )
;
--
James Kanze (GABI Software)
email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter
Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30
23 00 34