| View previous topic :: View next topic |
| Author |
Message |
utab Guest
|
Posted: Sun Feb 26, 2006 8:06 pm Post subject: Position File Pointer to newline immediately on some conditi |
|
|
Hi
Is there way to go to the start character of the the proceeding line
while reading from a file. (Sth like working '\n' but immediately will
take me one line down)
Lets say; my file is
abcdefghkl
123 23 43 54
12 3 34 56 77
....
....
....
For example when I am reading a specific line I would like to go to the
start of the newline for some reason.
Thx. |
|
| Back to top |
|
 |
TB Guest
|
Posted: Sun Feb 26, 2006 8:06 pm Post subject: Re: Position File Pointer to newline immediately on some con |
|
|
utab skrev:
| Quote: | Hi
Is there way to go to the start character of the the proceeding line
while reading from a file. (Sth like working '\n' but immediately will
take me one line down)
Lets say; my file is
abcdefghkl
123 23 43 54
12 3 34 56 77
...
...
...
For example when I am reading a specific line I would like to go to the
start of the newline for some reason.
Thx.
|
std::ifstream in(...);
in.ignore(std::numeric_limits<int>::max(),'\n');
--
TB @ SWEDEN |
|
| Back to top |
|
 |
|