I have a class needs to be serialized into an XML file. I can save the object into an XML file, but i can not load it back. I found the problem is the dynamic array, "double *pMixtureWeight". What's the correct way to serialize a dynamic array into a XML file if i don't want to change it to a vector<double>? thx a lot! class Model { public: Model(); virtual ~Model() ; private: // serialization support friend class boost::serialization::access; template<class Archive> void serialize(Archive & ar, const unsigned int /* file_version */) { ar & boost::serialization::make_nvp("FeatureDim", FeatureDim) ; ar & boost::serialization::make_nvp("MixtureNum", NumMixtures) ; for(int ii = 0 ; ii < m_iNumMixtures; ii ++ ) { string tag = "weight_" + boost::lexical_cast<string>(ii + 1) ; ar & boost::serialization::make_nvp(tag.c_str(), pMixtureWeight[ii]) ; } } private: int FeatureDim; int NumMixtures; double *pMixtureWeight; };