3 Oct
2006
3 Oct
'06
4:55 p.m.
I suspect the problem is the following: ofstream ofs(filename.c_str()); boost::archive::xml_oarchive oa(ofs); oa <<BOOST_SERIALIZATION_NVP(t); here the archive is being destroyed while there still might exist something in the output stream buffer. Try this: ofstream ofs(filename.c_str()); boost::archive::xml_oarchive oa(ofs); ofs.flush(); oa <<BOOST_SERIALIZATION_NVP(t); Robert Ramey