Boost logo

Boost Users :

From: luke (lux_at_[hidden])
Date: 2005-07-08 03:02:05


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net