structures and loops

i have a structure and i am going to enter data and store the data in a txt file. However i also want to be able to loop the program so that if i decide to make a second entry i can without overwriting the previous one. Any ideas how to do this.
you need to append data at the end of the file, make a search in the reference section for that (ofstream, flags, ape)

I don't remember very well, but i think it would be something like:

1
2
3
4
5
ofstream F;
F.open ("filename.txt", fstream::ape); // <---- here is the difference
// file output operations

F.close();


Hope this helps
Topic archived. No new replies allowed.