
28 Feb
2006
28 Feb
'06
4:40 p.m.
void Sensor::send(const SENSOR_Event *event){ ... // serialize to string std::stringstream s; boost::archive::text_oarchive oa(s); //SENSOR_Event tmp = *event; const SENSOR_Event tmp = *event; oa << tmp; std::string p = s.str(); ... }
Note that the above change will fix the "problem" . The following would be much better: void Sensor::send(const SENSOR_Event * const event){ // serialize to string std::stringstream s; boost::archive::text_oarchive oa(s); oa << event; std::string p = s.str(); }