![]() |
| ||
| C++ computer memory access I am trying to make a bank C++ program but the problem is that when the program terminates, data is lost and when I start it again, it reinitializes. Can someone tell me how to save the information in my harddrive and not my RAM? |
| ||
| Re: C++ computer memory access Well You should use files to store data and get back data in the beggining stages. filestreams would help you out with that. Try googling out filestreams with c++ for a tutorial. |
| ||
| Re: C++ computer memory access There are several ways... The most popular way would be to save the information to a file then retrieve it later. Another popular way that isn't done unless absolutely necessary is by querying information to a database then retrieving it later. There may be a way to fool around with memory and store the information somewhere more permanent, but I don't know how to do that, nor would I recommend it. |
| ||
| Re: C++ computer memory access Quote:
There are some types of memory more enduring than RAM (eg ROM) but using them relies on them being present (i.e. not guaranteed to be available for use on all computers) and also relies on significantly more knowledge than saving data to a disk file. |
| ||
| Re: C++ computer memory access Quote:
|
| ||
| Re: C++ computer memory access Hi like sbdy told u above search for Quote:
Quote:
Therefore whenever you write to a file, you write one thing after another--serially. Hence the name serialization. The opposite is called deserialization. Finally u might find helpful the following thread which is also about a bank account program and uses serialization: http://www.daniweb.com/forums/thread151845-2.html I am starting to suspect that u and Avaviel might be classmates.... :D :D :D |
| All times are GMT -4. The time now is 11:55 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC