SmartPointer that Iterates through a Container
Explore how to create a Container class representing a linked list and a SmartPointer class that uses operator overloading to enable iteration and element access. This lesson helps you understand managing non-contiguous memory locations using smart pointers and iterators in C++.
We'll cover the following...
We'll cover the following...
Problem
Write a program that maintains a linked list using a Container class. Also, implement a SmartPointer class that lets you access Container elements using the * operator and lets you iterate through the Container using the ++ operator.
Sample run
Here’s what you should see ...