$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Ramón Casero Cañas (yg-boost-users_at_[hidden])
Date: 2003-01-10 13:13:32
Hi, I would like to dinamically create a multi_array. Something like
typedef boost::multi_array<bool, 2> BoolMatrix;
typedef boost::multi_array<bool, 2>::index indexBoolMatrix;
boost::array<BoolMatrix::index, 2> shape = {{ 5, 8 }};
BoolMatrix *A; // NO MEMORY ALLOCATED
...
A = new BoolMatrix(shape); // MEMORY ALLOCATED
A.assign(data,data+40); // ELEMENTS INITIALIZED
The compiler (gcc 2.95.4) says that this kind of things are wrong. Or
didn't I understand how the memory allocation in multi_array works?
Cheers,
Ramón.