Chapter 4
Advanced Class Usage
IN THIS CHAPTER
Using polymorphism effectively
Adjusting member access when deriving new classes
Multiple-inheriting new classes
Making virtual inheritance work correctly
Putting one class or type inside another
Classes are amazingly powerful. You can do so much with them. In this chapter, you discover many of the extra features you can use in your classes. But these aren’t just little extras that you may want to use on occasion. If you follow the instructions in this chapter, you should find that your understanding of classes in C++ greatly improves, and you’ll want to use many of these topics throughout your programming.
This chapter also discusses many of the issues that come up when you’re deriving new classes and inheriting members. This discussion includes virtual inheritance and multiple inheritance, topics that people mess up a lot. As part of this discussion, you see the ways you can put classes and types inside other classes.
Get C++ All-in-One For Dummies, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.