Nat Goodspeed | 14 Jul 23:47
Favicon

Re: how can I return a 'null' smart pointer?

Meryl Silverburgh wrote:

> MyAPtr myfunction(MyAVector& v, int size) {
>       if (index < v.size()) {
>             return v[index];
>        } else {
>           // how can I return NULL here?

Does it work to return MyAPtr() ?

>       }
> 
> }

Gmane