Hey, I am trying to add text to the top of a text file via a c++ program. Sound confusing? Okay, my program starts out by asking for input. When done entering the input, it outputs it to a text file. Now, I want to be able to open the text file later on and add some more info. However, I want the new data to be added to the top of the text file already created (not deleting previous data)
Example of text file layout:
Code:
new data
old data
old data
if you could point out a good resource for this, that would be most helpful.
thanks,
Ben