perhaps, pointers have been on a course of modification
regular pointers to auto_ptr to unique_ptr and shared_ptr
I just wanted to know that the new types of pointers that have been developed completely overtake over the older versions(OR the versions of the pointers that you may consider having memory leak problems)
I don’t think regular pointers are dead but recently I came across auto-ptr and then I came to know a bit about shared_ptr and unique_ptr added to C++ox.I can’t use them(shared_ptr and unique_ptr) though because I am having visual C++ 2008.
Also is auto_ptr completely taken over by unique_ptr and shared_ptr?
Please give some insight.
Raw pointers are still useful if you don’t own the object it points at.
auto_ptris officially deprecated (so yes, it’s pretty much dead for new code). VS2008 providesshared_ptrthough as part of TR1, and there’s always Boost. I don’t see any need for any other smart pointers in my C++ life right now.