It would be pretty tough to de-serialize a pointer to a const since
serialization has to change the thing being pointed to.
 
Try
 
struct mystruct
{
/*const*/ char *  name;
/*const*/ char * name2;
int number;
}

class my_class
{
friend class boost::serialization::access;
private:
const mustruct * object1
}
Also, a closer reading of the documentation might be helpful.
 
Robert Ramey
"niranjan bangera" <niranjannina@gmail.com> wrote in message news:50a2f6f20812032046s56cd07cer52e40ffaf7d5d9d4@mail.gmail.com...
hi all,
Am new to boost serialization concept.  here i want to serialize these classes please help me to do this;
i tried doing this but am gettin some compile time errors while serializing the object1, Please help me to do this,
Boost version am using: 1_36_0
c++ compiler: GCC 4.1.1 (gnu-gcc-4.1.1-binutils-2.16.1/x86_64-pc-linux2.4/bin/gcc)

Please help me to solve this simple concept..

Thanks in advance,
Nina

struct mystruct
{
const char *  name;
const char * name2;
int number;
}

class my_class
{
private:
const mustruct * object1
}


_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users