Example, a list of Windows

This slide shows the use of this class. Any type of pointer can be inserted into the container. But when we remove an element, it must be cast back to the correct type.

This slide, by the way, shows the tradition syntax for a C++ cast operation. A recent addition to C++ is something called a dynamic cast, which provides a much safer alternative for performing casts of this nature.

[audio] [real] Text to accompany slide13, in Chapter 15 of An Introduction to Object-Oriented Programming