Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2007-02-21 12:53:52


Surya Kiran Gullapalli wrote:
> std::ostringstream os ;
> boost::archive::binary_oarchive oa (os) ;
> oa << class_obj ;

This could well be a problem. binary archives require that the associated
stream i/o be opened with the
ios_base_binary flag. My documentation for ostrstream shows the following
prototype.
ostrstream( );
ostrstream(
   char *_Ptr,
   streamsize _Count,
   ios_base::openmode _Mode = ios_base::out
);As test, you might try text_?archive and see if the problem goes
away.Robert Ramey


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