Put stream pointer in chosen line

Hi!

I need to concatenate several data files into one file, but in each source file the data only begins at the 6th line, so I want to start reading from that line. Is there a function that puts the stream pointer directly in that line?
New line is only marked by '\n', so you'll have to find 5 of them.
You could call getline 5 times
Or you could do this:
1
2
for(int line = 1; line < 6;)
    if(file.get() == '/n') line++;
Strange... I thought it would be logical to exist one function to put the stream pointer in the beginning of a line.

Too bad... :(.

Thanks anyway hamsterman
Topic archived. No new replies allowed.