$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] how to use boost::shared_ptr?
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2013-02-01 12:01:12
On 1 February 2013 16:46, young <yqin_99_at_[hidden]> wrote:
> Can I assign a array to a shared_ptr pointer?
Read the docs, Luke!
"Normally, a shared_ptr cannot correctly hold a pointer to a
dynamically allocated array. See shared_array for that usage."
http://www.boost.org/doc/libs/1_52_0/libs/smart_ptr/shared_ptr.htm
And, don't forget to follow the link there and read this one too:
http://www.boost.org/doc/libs/1_52_0/libs/smart_ptr/shared_array.htm
Best regards,
-- Mateusz Loskot, http://mateusz.loskot.net