Boost logo

Boost Users :

Subject: Re: [Boost-users] How to convert shared_ptr to pointer?
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2013-01-03 12:24:24


On 3 January 2013 17:21, young <yqin_99_at_[hidden]> wrote:
> I have shared_ptr<int> variable. I need to pass a int* pointer to a function
> call. How to pass shared_ptr<int> as int *?

Look at the manual [1] and search for get() member and get_pointer
free function.

[1] http://www.boost.org/doc/libs/1_52_0/libs/smart_ptr/shared_ptr.htm

Best regards,

--
Mateusz Loskot, http://mateusz.loskot.net

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