CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2008
    Posts
    32

    "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

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: "Permanent" data storage?

    In MFC, you can use serialization with the CArchive class. You can also save the data to an xml file.

  3. #3
    Join Date
    Oct 2008
    Posts
    32

    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
  •  





Click Here to Expand Forum to Full Width

Featured