
25 Nov
2009
25 Nov
'09
3:01 p.m.
Jeff Wrote:
Are the underlying streams opened as binary?
Jeff
Yes, This is how I save, the the restore is analogous. Using boost 1.39 void save(bool binary) const { if (binary) { std::ofstream ofs( fileName_.c_str(), ios::binary ); boost::archive::binary_oarchive oa( ofs ); oa << *this; } else { std::ofstream ofs( fileName_.c_str() ); boost::archive::text_oarchive oa( ofs ); oa << *this; } } Ok I was trying eventually to use the portable binary archive, however I suspect that would crash as well. I will try to create a standalone program that shows the crash using the binary archive first. Best regards, Ta, Avi