Re-read a file

Hello guys,
Is it possible to fin.open, fin.close then fin.open the same file again in one code? The reason why I want to do so is that I can have the computer to read the fin from the beginning once again. Or, alternatively, is there some code that I can use to have the computer to re-read the file?
Thanks.
Bosco
Yes you can do that.

You can also run fin.seekg(0, std::ios::beg); to start reading from the beginning of the file again.
Topic archived. No new replies allowed.