Boost logo

Boost Users :

Subject: Re: [Boost-users] serialization
From: Robert Ramey (ramey_at_[hidden])
Date: 2012-10-23 22:33:57


> main()
> {
>
> ...
> const A* a = new a("stuff");
> const A* c = new c(*a, 52.54390f); // alter to base class pointer
>
> {
> ofstream ofs("dump.bin");
>
> boost::archive::text_oarchive oa(ofs);
> oa<<a<< c>
> }

Try the above change

Robert Ramey


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