Mail Archives: djgpp/1997/03/19/03:26:55
Hi
I'm relatively new to C++, and I'm wondering how do do something: I've
got a text file with a line containing a single number. I want to
extract that number from the ifstream *and advance the file pointer to
the start of the next line to read a string*. I've looked at some of the
other member functions, and it seems that ignore (32767, '\n') should do
it, but that seems very cumbersome. What is the standard procedure for
doing this (the Pascal equivalent would be readln(inf, theVar);).
Thanks in advance
------------------------------------------------------------
| Bruce Merry aka The Almight Cheese | bmerry AT cssa DOT org DOT za |
| http://www.cs.uct.ac.za/~bmerry/ | +27 21 720042 |
| | |
| If Bill Gates was a robber, he'd not only shoot you, but |
| he'd charge you for the bullets as well. |
------------------------------------------------------------
- Raw text -