Sign in to follow this  

shared pointr boost and **pPointer

This topic is 2544 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello.
I have a shared_ptr boost and I have to send to a library a function a pointer to a pointer:
for a raw pointer eg

type * pPointer
functionx void (** pPointerSend ppPointer)

for call it: functionx (& pPointer);
but with the boost::shared_ptr?

boost:: shared_ptr <type> t (new type ());
.
.
void f (type ** ppType);

I tried to get:

f (& t.get ())

but it gives me this error Error 7 error C2102: '&' Requires l-value c: \ PGN \ trunk \ PGEApplication \ WindowApplication.cpp 86

thanks.

[Edited by - giugio on December 24, 2010 6:48:42 AM]

Share this post


Link to post
Share on other sites
this is the directx 11 function and the m_ptrSwapChain is the boost shared_ptr(i use a typedef):

hr = D3D11CreateDeviceAndSwapChain( NULL, m_driverType, NULL, createDeviceFlags, featureLevels, numFeatureLevels,
D3D11_SDK_VERSION, &sd, &*m_ptrSwapChain.get(), &m_ptrDevice, &m_featureLevel, &m_ptrDeviceContext );

Share this post


Link to post
Share on other sites

This topic is 2544 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this