ofstream - question

Hey guys,

I#m currently at a roblem, that I can' overcome myself. I want to write some data into .txt Files of the corresponding User.
Like User1.txt, User2.txt etc.
Also I want to write some data for specific times into separate .txt Files.
Thing is, those are interconnected, so User1 and User2 share an action on time5 for example. Also, the longer you let the program run and the more entries you make, the more data needs to be in the .txt Files.

I now want to put the User.txt files ino a seperate Folder and the time.txt Files in another one. + I want to be able to open a .txt file and continue writing it, not just start blank, how can i do this?

FOR CREATING FILES IN DIFFERENT FOLDERS
In order to achieve this, you'll have to write the complete directory every time a new file is to be created.

fout.open("M:\data.txt");

FOR RESUMING A FILE
fout.open("User1.txt", ios::app);
app - appends to the file instead of overwriting.

Also, try to explain your question better.
Topic archived. No new replies allowed.