Boost; Default constructor work around.

Hi, I need to know the information abt Constructor in my class to be serialized. What if i dont have defualt constructor in my class. Any other work around rather then putting the default construcor in my class, Pls Let me know if any workaround or doccumentaion. Boost: 1.38.0 ==== Compiler: ====== /_TOOLS_/dist/gnu-gcc-/4.1.1-binutils-2.16.1/x86_64-pc-linux2.4/bin/gcc class Myclass { Myclass (const string & a) { name=a; } private: int a; string name; //serialization code }; Thanks in Advance. Thanks, Niranjan

niranjan bangera wrote:
Hi, I need to know the information abt Constructor in my class to be serialized. What if i dont have defualt constructor in my class. Any other work around rather then putting the default construcor in my class, Pls Let me know if any workaround or doccumentaion.
Boost: 1.38.0 ====
Compiler: ====== /_TOOLS_/dist/gnu-gcc-/4.1.1-binutils-2.16.1/x86_64-pc-linux2.4/bin/gcc
class Myclass { Myclass (const string & a) { name=a; } private:
int a; string name; //serialization code };
See the section on references, there's an example: http://www.boost.org/doc/libs/1_38_0/libs/serialization/doc/serialization.ht... Jeff
participants (2)
-
Jeff Flinn
-
niranjan bangera