Course Object Oriented Programming
Inheritance in C++ (private)
In this lesson, you will learn how to use private access in C++ inheritance.
Syntax
The basic syntax is shown below:
class <derived_class> : [<access>] <base_class> {
// derived class code
};
For example:
Now letโs take a look in how this syntax is used inside an example.
class student : private person {
// derived class code
};