|
Boost Users : |
Subject: Re: [Boost-users] multi_array resize question
From: Max (loadcom_at_[hidden])
Date: 2009-01-13 21:01:33
> Subject: [Boost-users] multi_array resize question
>
> Hi,
>
> The documentation from multi_array says that if elements are added while
> reszize is called, the new elements are initialized with the default
constructor. I
> have the following:
>
> typedef boost::multi_array<Object*, 2> Array_Type;
>
> What is the default constructor of a pointer?
>
> Or do need to do the following:
>
> class ptr {
> public:
> ptr() {
> p = 0;
> }
> Object *p;
> }
>
>
> typedef boost::multi_array<ptr, 2> Array_Type;
>
> ... to get all new elements to bee zero-pointers?
>
> Thanks for help.
>
> regards
>
> W. Holzke
try
typedef boost::multi_array<boost::value_initialized<Object*>, 2> Array_Type;
B/Rgds
Max
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