boost serialization and doubles
I am trying to serialize a class to a string using the boost serialization library and included in my class are several double member variables. Below is the code I'm using to serialize: #include <boost/archive/text_oarchive.hpp> #include <boost/archive/text_iarchive.hpp> #include <boost/serialization/string.hpp> std::stringstream ss; boost::archive::text_oarchive oa(ss); oa << mPoint; Here is the serialiation method within my Point class: friend class boost::serialization::access; template<class Archive> void serialize(Archive & ar, const unsigned int version) { if (version > 0) { ar &