I am trying to Serialize a class :
StartPeerSessionRequest::StartPeerSessionRequest() {
mProtocolVersion = 1*10000 + 14*100 + 4;
mSessionFlags = 1;
mMaxResponseLength = 0;
mMake = "MyMake";
mModel = "MyModel";
mSerialNumber = "10000";
mTrackDelay = 0;
mHeadUnitModel = "Headunit";
mCarModelYear = "2014";
mVin = "1234567980";
mVehicleMileage = 1000;
mShoutFormat = 3;
mNotificationInterval = 1;
}
template <class Archive>
void StartPeerSessionRequest::serialize(Archive &ar, const unsigned int version)
{
ar & mProtocolVersion;
ar & mSessionFlags;
ar & mMaxResponseLength;
ar & mMake;
ar & mModel;
ar & mSerialNumber;
ar & mTrackDelay;
ar & mHeadUnitModel;
ar & mCarModelYear;
ar & mVin;
ar & mVehicleMileage;
ar & mShoutFormat;
ar & mNotificationInterval;
}
void StartPeerSessionRequest::save()
{
boost::archive::binary_oarchive oa(serlreq, boost::archive::no_header);
oa << (*this);
/*cout<<"\n binary_oarchive :"<