20 Nov
2006
20 Nov
'06
3:39 p.m.
Martin Waller wrote:
#include
#include MyClass::MyClass() { init(); }
void MyClass::init() { spOther(new someOtherClass(this));
You can not call a constructor here. spOther has already been default constructed. Instead you should use the reset member function: spOther.reset(new someOtherClass(this));
}