Posted on 2004-04-14
I wish to save some objects in a data file to make the state of an application persistent. Is this possible in c++? As things stand I have one main object with member variables of different classes built into it. For example, class main has a vector<Person> people; in it. I simply wish to store main transparently in a file and recreate it with the exact state of the object and all its sub objects intact. Am I allowed or is there some more low level facility? I have used Java in the past and ObjectStreams, or something similar, so would like a c++ equivalent.
Thanks for any help.