![]() ![]() ![]() ![]() ![]() ![]() ![]() | Abstraction Mechanisms, Part 1 - slide 16 : 41 |
An auto pointer, auto_ptr, is an encapsulation of a pointer that uses the RAII resource management idea
![]() | An illustration of auto_ptr<Point>. |
![]() | The program output. |
An auto pointer 'owns the pointer' - no other auto pointer should exist to the object
Due to the special meaning of copying, auto pointers cannot be used as the element type in standard containers