template <class T> class auto_ptr{ T* ptr; public: explicit auto_ptr(T* p = 0) : ptr(p) {} ~auto_ptr() {delete ptr;} ____________________________________
T& operator*() {return *ptr;} ____________________________________
T* operator->() {return ptr;} // ... }; auto_ptr<int> aupr; //aupr is nullptr even you don’t initialize it.