#include #include using namespace std ; //-------------------------------------------------------- class Point { public: int x1 ; int y1 ; Point( int x1P , int y1P ) { x1 = x1P ; y1 = y1P ; cout << "Constructor called for x1:" << x1 << " y1:" << y1 << endl ; } ~Point( ) { cout << "Destructor called for x1:" << x1 << " y1:" << y1 << endl ; } }; //-------------------------------------------------------- int main() { Point* ptr1 = new Point( 2,3 ) ; //Must remember to delete delete ptr1 ; //Old style of creating a unique pointer unique_ptr ptr2( new Point(4,5) ); //new style with C++ 14 unique_ptr ptr3 = make_unique(6,7) ; return 0 ; } //--------------------------------------------------------