Lecture 4 - Slide 15 : 40
Example use of unique_ptr and shared_ptr

We study the use of raw pointes, unique_ptr, and shared_ptr

These examples are reserved for the exercise session

point.h
The usual class Point - nothing of particular interest.
point.cc
The usual implementation of class Point - nothing of particular interest.
raw-ptr1.cc
An illustration of raw pointers.
raw-ptr1-output
Program output.
unique-ptr1.cc
An illustration of unique_ptr<Point> - same example as for raw pointers.
unique-ptr1-output
Program output.
Go to exercise
A variant of the unique_ptr program
shared-ptr1.cc
An illustration of shared_ptr<Point> - same example as for unique_ptr<Point>.
shared-ptr1-output
Program output.
Go to exercise
A variant of the shared_ptr program
shared-ptr2.cc
Another simple illustration of shared_ptr<Point>.
shared-ptr2-output
Program output.
raw-ptr2.cc
Similar program with raw pointers.
raw-ptr2-output
Program output.