Boost logo

Boost Users :

Subject: Re: [Boost-users] serialization of an dynamic array to read/write a image in xml
From: Damien R (damien.rg_at_[hidden])
Date: 2009-09-25 02:38:16


Robert Ramey wrote:
> also you could try
>
> ar & make_nvp("data", binary_object(sizeof(mpData), & mpData))
This code do not work for dynamic allocation of mpData.
data_type * mpData = new data_type[MAX];
sizeof(mpData) = sizeof(data_type *);

but it will be fine if you have static allocation :
data_type mpData[MAX];
sizeof(mpData) = MAX * sizeof(data_type);


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