pointer to line in file

lilgirl

Newcomer
Joined
Jun 21, 2003
Messages
24
I have an app that opens a text file and reads its contents one line at a time. My app requires the file to be read several times, but starting from a specific line in the file rather than from the top. Thus, I would like to set a pointer to a line within a file. Does anybody know how I can do this? If this is not possible, is there a way to sort of "rewind" the file to the line I want after I have read the entire file once already?
 
Read file to array

How large is your file, and what kind of data in the file? If it not that big, why don't you read the whole thing into an array and then you can access it anyway you want to without re-read the file again. Unless it is something that you can't store in array.
 
Back
Top