If I have:
How do i change the value pointed to by p?Code:shared_ptr<SomeClass> p( new SomeClass() );
I want to do something like:
Code:*p = new SomeClass();
This is a discussion on How change value pointed to by shared_ptr? within the C++ Programming forums, part of the General Programming Boards category; If I have: Code: shared_ptr<SomeClass> p( new SomeClass() ); How do i change the value pointed to by p? I ...
If I have:
How do i change the value pointed to by p?Code:shared_ptr<SomeClass> p( new SomeClass() );
I want to do something like:
Code:*p = new SomeClass();