
24 Nov
2006
24 Nov
'06
7:26 p.m.
Larry Smith wrote: I can not get these struct members to
serialize; I get compile errors, e.g. this fails to compile:
ar & fld; // where fld is: char[200]
Hmmm - works for me. The following example compiles just fine. #include <sstream> #include <boost/archive/text_oarchive.hpp> struct x { char y[200]; template<class Archive> void serialize(Archive & ar, const unsigned int version){ ar & y; } }; int main(int argc, char *argv[]){ std::stringstream os; boost::archive::text_oarchive oa(os); const x x1; oa & x1; } Robert Ramey