File restarts

I'm having a problem with this program that reads a text document from start to finish, and then needs to repeat it. Only problem is, I don't know how to make it jump back to the start again. Any ideas?
If I understand the problem, one way is to do a fileIn.close() after the first reading (where fileIn is your ifstream object name) and then do a fileIn.open() again.
closed account (zb0S216C)
Try looking into these:

References:
seekg: http://www.cplusplus.com/reference/iostream/istream/seekg/
tellg: http://www.cplusplus.com/reference/iostream/istream/tellg/


Wazzak
Thanks guys! Problem solved ^_^
Topic archived. No new replies allowed.