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

Q&A

Q1:Are inherited members and functions passed along to subsequent generations? If Dog derives from Mammal and Mammal derives from Animal does Dog inherit Animal's functions and data?
A1: Yes. As derivation continues, derived classes inherit the sum of all the functions and data in all their base classes.
Q2:Can a derived class make a public base function private?
A2: Yes, and it will then remain private for all subsequent derivations.

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