Where do I store data that I don't want to disappear on the programs termination?
Where do I store data that I don't want to disappear on the programs termination?
My computer is awesome.
You mean like a file?
EDIT
I like this tutorial,
http://www.daniweb.com/techtalkforum...2&page=1&pp=15
Last edited by MadCow257; 03-01-2005 at 07:36 PM.
look at the tutorials on this site on how to use functions of the <fstream> library to send and read data to a file.
- "Problem Solving C++, The Object of Programming" -Walter Savitch
- "Data Structures and Other Objects using C++" -Walter Savitch
- "Assembly Language for Intel-Based Computers" -Kip Irvine
- "Programming Windows, 5th edition" -Charles Petzold
- "Visual C++ MFC Programming by Example" -John E. Swanke
- "Network Programming Windows" -Jones/Ohlund
- "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
- "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel
Send it to a file. That's the only way to save the data on a program's termination.
There's rarely ever an 'only' way. You could also, for example, write it to the registry (goes into a file somewhere, but it's still somewhat different). Or, send it to a server somewhere on the net, that stays online 24/7. Or, print it, and on next startup have the user scan the printed sheet and parse the image with some OCR algorithm to retrieve the data. Plenty of ways to store data
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
Ok, Hunter, that's.. pedantic. :P
If you want you could have another process and use IPC to send the other process the data, then read it back when you start the program again. Many ways to save the data, though the most common has already been mentioned: files.