8 Jul
2005
8 Jul
'05
8:02 a.m.
Filip Peters wrote:
Hi,
seems you're mixing binary and text? you're reading in text in your example...
//WRITE std::ofstream ofsb("filenameb"); boost::archive::binary_oarchive ob(ofsb);
//READBACK std::ifstream ifs(fname.c_str(), std::ios::binary); boost::archive::text_iarchive ia(ifs);
Also, I had to do std::ofstream ofsb("filenameb", std::ios::binary); before it would work correctly.
(I started using boost/serialization this week and also had some issues at first (with vc7.1), but it's working nicely now) The serialisation lib is quite nice!
Filip Peters.
Hei ... thanks a lot std::ofstream ofsb("filenameb", std::ios::binary); ^^^^^^^^^^^^^^^^^ now I works for me too :-) luke