O'Reilly logo

Sams Teach Yourself C++ in 24 Hours, Third Edition by Jesse Liberty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

In this hour, you learned how to use the dynamic_cast operator to cast down the inheritance hierarchy. You also learned why this may be a sign of poor class design.

You also saw how to create abstract data types using pure virtual functions and how to implement the pure virtual functions so that they can be used by derived classes. Any class with a pure virtual function is abstract, and abstract classes may not be instantiated. You examined how you can create hierarchies of abstract data types to represent abstractions in your design, and how you must ultimately create non-abstract (concrete) classes which can be instantiated.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required