|
Boost Users : |
Subject: Re: [Boost-users] how to serialize a const class_name *object
From: Robert Ramey (ramey_at_[hidden])
Date: 2008-12-04 11:25:41
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_at_[hidden]> wrote in message news:50a2f6f20812032046s56cd07cer52e40ffaf7d5d9d4_at_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_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
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