|
-
February 22nd, 2010, 09:44 PM
#1
"Permanent" data storage?
I am writing a program that has many variables, probably 40ish of them, ranging from booleans to colors to time. I need to be able to save these variables so that when the user reopens the program they can reload the data. I have tried using the writepriviteprofileint type methods, but that method is get very cumbersome due to the amount of info I need to store. I know that in Java you can just like save a class, is there anything similar to that in C++ or any other good way to store a bunch of different variables. I am using a shared memory class to save all of my variables. If it matters, I am using the MFC library for my visual stuff.
Thanks,
Evan Plett
-
February 22nd, 2010, 11:27 PM
#2
Re: "Permanent" data storage?
In MFC, you can use serialization with the CArchive class. You can also save the data to an xml file.
-
February 23rd, 2010, 01:19 PM
#3
Re: "Permanent" data storage?
Thanks, I think that is exactly what I was looking for.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|