|
Boost Users : |
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2007-11-21 09:04:12
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
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