hi Everyone,
I'm working with a Text file. Somewhere in my code a function returns the current position of the file pointer. But i want it to go to the next line or 2 lines after to do a string search there. Anybody knows how i can do that?
Bests,
hi Everyone,
I'm working with a Text file. Somewhere in my code a function returns the current position of the file pointer. But i want it to go to the next line or 2 lines after to do a string search there. Anybody knows how i can do that?
Bests,
Store all the lines into a vector.
To point to a line below just do:-
current line + 1
Thanks for your quick response. :)
hi Everyone,
I'm working with a Text file. Somewhere in my code a function returns the current position of the file pointer. But i want it to go to the next line or 2 lines after to do a string search there. Anybody knows how i can do that?
Bests,
If you want the file pointer to goto the next line, then just use the getline(...) funtion
to read in the current line as a dummy. And the file pointer will proceed to the beginning
of the next line.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.