1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-07-31 20:10:49 +02:00

[C++/en] Small inheritance clarification

Clarified that private members are inherited but are not directly
accessible
This commit is contained in:
Cameron Wood
2015-10-11 03:41:20 -04:00
parent 8592f26199
commit e32eb715ef

View File

@@ -404,6 +404,8 @@ int main() {
// Inheritance:
// This class inherits everything public and protected from the Dog class
// as well as private but may not directly access private members/methods
// without a public or protected method for doing so
class OwnedDog : public Dog {
void setOwner(const std::string& dogsOwner);