passing a file to a function.


Hey there!

I am working on a program that uses a function to get data from a text file.

I pass the file into the function, that reads the data, and it passes certain info back into main. so far so good.

Butt my problem is that, every time I call the function again it resets back to the start of the file, so it keeps 'grabbing' the same info over and over again instead of continuing where it left off. Does that make sense?

Any idea on how I could do that?
Hmmm I don't think that's what I was looking for.

the function in my program reads the file but every time I call the function in Main.. It starts reading the info from the beginning of the file.
And I want it to read it, instead, from where it left off NOT from the beginning.
Pass a pointer.
Perhaps you could provide some code so we don't have to break out our crystal balls and magically divine what you're doing.
Topic archived. No new replies allowed.