Going to a specific line in a txt file using ifstream
Posted on 2008-06-10
I'm currently using ifstream to go through a text file line per line, when encountering, for example, the character $ at the beginning of the line, it saves that line's number in an array.
Now I'd need to be able, without closing that ifstream if possible, to go to that line without going through all the previous ones and start using getline from that position.
How could I best do that?
Thanks in advance.