Lecture 5 - Slide 8 : 40
Destructors and Inheritance - Virtual Destructors

A class with virtual functions should always have a virtual destructor

prog2-f15.cc
Base class A and derived class B with non-virtual destructors - motivation.
prog2-f15-output
Program output.
prog3.cc
Base class A and derived class B with virtual destructors.
prog3-output
Program output.
prog4.cc
Base class A and derived class B and C with virtual destructors.
prog4-output
Program output.