
26 Aug
2010
26 Aug
'10
2:48 p.m.
Hi, Is it ok to serialize/deserialize in the object I get when dereference a pointer ? void f() { B* bObj=new B(); /// save { std::ofstream ofs("C:\\hh.txt"); boost::archive::xml_oarchive oa(ofs); oa & make_nvp("bObj",*bObj); } //// Load { std::ifstream ifs("C:\\hh.txt"); boost::archive::xml_iarchive ia(ifs); ia & make_nvp("bObj",*bObj); } } My second question : Is it ok to serialize/deserialize in *this ? Thanks