mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-06 06:47:54 +02:00
Merge pull request #1469 from Alters/master
[C++/en] Small inheritance clarification
This commit is contained in:
@@ -404,6 +404,8 @@ int main() {
|
|||||||
// Inheritance:
|
// Inheritance:
|
||||||
|
|
||||||
// This class inherits everything public and protected from the Dog class
|
// 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 {
|
class OwnedDog : public Dog {
|
||||||
|
|
||||||
void setOwner(const std::string& dogsOwner);
|
void setOwner(const std::string& dogsOwner);
|
||||||
|
Reference in New Issue
Block a user