The below code is working fine:
scoped_ptr<clsA> pclObjA(new clsA());
But the below statements are not working:
scoped_ptr<clsA> pclObjA;
// some statements
pclObjA(new clsA());
I am getting compilation error like below:
error: no match for call to ‘(boost::scoped_ptr<clsA>) (clsA*)’
Please help me to solve this issue.
Additional Info: the clsA
derived from claX