1. how to test whether auto_pointer is null?
if (!myPointer.get()) { // do not dereference here }
2. how to pass auto_pointer ?
std::auto_ptr<class> ptr_class = std::auto_ptr( new class );
1. how to test whether auto_pointer is null?
if (!myPointer.get()) { // do not dereference here }
2. how to pass auto_pointer ?
std::auto_ptr<class> ptr_class = std::auto_ptr( new class );