On 5/23/2013 8:41 AM, Warp wrote:
> Kevin Wampler <nob### [at] nowhere net> wrote:
>> On 5/21/2013 10:25 AM, Orchid Win7 v1 wrote:
>>> However, I can't seem to figure out what to write in the constructor.
>>> I've got a field that looks like
>>>
>>> boost::shared_ptr<std::vector<Foo>> _foo;
>>>
>>> What do I need to do to initialise this correctly?
>
>> boost::shared_ptr<std::vector<Foo>> _foo(new std::vector<Foo>());
>
> *Where* are you doing that?
>
I was just giving him an example to point out that you pass a raw
pointer to the constructor of shared_ptr and assuming that he'd figure
the rest out from there. But you're right that I perhaps should have
been more explicit.
Post a reply to this message
|