Well I know that... I just don't know how to...
I tried something like this:
ofstream someFile("file.txt", ios_base::app); ifstream someOtherFile("file.txt");
but that didn't work either...
Then you did it wrong. Since you didn't bother to post the bad code, we can't very well help.
Before you just post more code and ask us to tell you what to do, think about it...
1) How do you open a file for writing? You seem to know this one OK.
2) Where do you need to open the file for writing? What lines of code does the file have to be open for?
3) How do you open a file for reading?
4) Where do you need to open the file for reading?