C++: ^D for std::istream input; input.good()
Hi there, I've noticed that often when I use
while( input.good() )
input >> some_var;
I usually get the last value on the input stream twice. It's as though the ^D catches after input.good, and does not get stored into some_var. Is there a tasteful way around this?
Thanks
|