5 Nov
2009
5 Nov
'09
8:44 a.m.
On Nov 5, 2009, at 12:42 AM, B Hart wrote:
void store(const char* filename){
std::ofstream ofs(filename); boost::archive::text_oarchive oa(ofs);
oa << this; }
void load(const char* filename){
std::ifstream ifs(filename); boost::archive::text_iarchive ia(ifs);
ia >> this;
}
Don't you mean oa << *this and ia >> *this? I doubt that you want a new object created in load, but rather this object loaded from the file? Matthias