Boost logo

Boost Users :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2005-09-30 02:42:18


John Sun wrote:

<snip>

You can't assign anything to a scoped ptr, you have to use it's reset
member function. (See http://www.boost.org/libs/smart_ptr/scoped_ptr.htm.)

> CTest::Initialize()
> {
> int aa, bb;
> m_spTest2=new CTest2(aa, bb);

     m_spTest2.reset(new CTest2(aa, bb));

> }

Markus


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