Hour 17. Polymorphism and Derived Classes

In the previous hour, you learned about inheritance and how derived classes can create an inheritance hierarchy. You also saw how methods in the base class can be overridden in the derived class. In this hour, you will learn how virtual methods enable you to use your base classes polymorphically. The following topics are covered:

  • What virtual methods are

  • How to use virtual destructors and copy constructors

  • The costs and dangers in using virtual methods

Get Sams Teach Yourself C++ in 24 Hours, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.