Search code examples
c++smart-pointersscoped-ptr

Which header should be used for using scoped_ptr


I want to use smart pointer in my c++ application.

Which header file I should include for using std scoped_ptr?


Solution

  • There is no scoped_ptr in the standard C++ library. All C++11 smart pointers are in header <memory>. If you want boost::scoped_ptr then you need boost/scoped_ptr.hpp.