$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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);