How to pass data to harddrive after programme closes

How do you save the results from a programme after it closes?
And vice versa how do you input data to a programme apart from keyboard.

I understand one way to do this is by text files. What are the other methods?
Obviously your program can't do anything after it closed, because it is not running any more ..
The idea would be to find when the program closes, and save what you need before that happens.
The only way to interact with the hard drive you should be concerned about is using files. You are not restricted to text files. To see how, see http://www.cplusplus.com/doc/tutorial/files/
Topic archived. No new replies allowed.