|
Boost Users : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2006-11-24 21:26:17
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
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