lines

I know there is preset macro to return the line number you are on in the file being compiled however im having my program read this text file and i dont know how to do anything but start from the very beginning of the file. is there any way to skip around the text file or return the line number of it?
The file that a compier sees (your source code) is different from the line that compiled code reads (your data).
yea thats what it thought. is there a way through?
You can jump to a specific byte offset using seekg(). However, unless you know the lengths of all lines, you'll have to read the text file entirely to see how long each line is before you can compute the offset for a line.

is there any way to skip around the text file or return the line number of it?

What is "it"?
Topic archived. No new replies allowed.