C++ Notes: Programming Exercises - Extend CheckedArray
Base Program
Use one of the following for the base program for these changes.
Exercises
- The CheckedArray class dynamically allocates memory, but never deallocates
it. Fix this memory leak by writing a destructor.
- When a CheckedArray parameter is passed, the default copy constructor
will only make a shallow copy. Write a copy constructor
to make a deep copy.
- Shallow copies are also made by the assignment operator by default.
Overload the assignment operator to make a deep copy.