[Insight-users] array of smart pointers
Kevin H. Hobbs
hobbsk at ohiou.edu
Thu Oct 15 14:22:24 EDT 2009
On Thu, 2009-10-15 at 13:54 -0400, Kevin H. Hobbs wrote:
> I got the array of smart pointers from malloc with :
>
> FloatImageType::Pointer * recv_images =
> (FloatImageType::Pointer *) malloc(
> mpi_size * sizeof( FloatImageType::Pointer ));
>
> I know this isn't very C++ish but shouldn't it work?
Never mind.
std::vector< FloatImageType::Pointer > recv_images( mpi_size );
works just fine.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091015/208e20fa/attachment-0001.pgp>
More information about the Insight-users
mailing list