auto_ptr

This class template is deprecated as of C++11. unique_ptr is a new facility with a similar functionality, but with improved security.
auto_ptr is a smart pointer that manages an object obtained via new expression and deletes that object when auto_ptr itself is destroyed.
An object when described using auto_ptr class it stores a pointer to a single allocated object which ensures that when it goes out of scope, the object it points to must get automatically destroyed. It is based on exclusive ownership model, i.e. two pointers of the same type can’t point to the same resource at the same time. 
<b>Why is auto_ptr deprecated?</b>
It takes ownership of the pointer in a way that no two pointers should contain the same object. Assignment transfers ownership and resets the rvalue auto pointer to a null pointer. Thus, they can’t be used within STL containers due to the aforementioned inability to be copied.