21 Nov
2007
21 Nov
'07
2:04 p.m.
See inline swapna wrote:
How can I instantiate a static pointer of a class using boost::scoped_pointer ? like for example:
static classA *A;
namespace { boost::scoped_ptr<classA> aPtr; }
int main { ... ... A = new ClassA (PArameter list);
aPtr.reset( new ClassA(ParameterList) );
} How do I do this with boost::scoped_pointer.
But there is no need to use static or unnamed namespace as the same effect could be accomplished with aPtr being declared within the scope of main, AFAIC. Jeff Flinn