T
tradevol
Hi,
I am playing with boost pointer and try to wrap the following codes
A* func(){
...
if(condition 1 ){
return a;
}
else
return NULL;
}
Now I wrap a as shared_ptr(new A()) and change funcion as share_ptr<A>
func();
The problem is that shared_ptr will not accept NULL.
How should I do it in this case?
Thanks
Chris
I am playing with boost pointer and try to wrap the following codes
A* func(){
...
if(condition 1 ){
return a;
}
else
return NULL;
}
Now I wrap a as shared_ptr(new A()) and change funcion as share_ptr<A>
func();
The problem is that shared_ptr will not accept NULL.
How should I do it in this case?
Thanks
Chris