Course Object Oriented Programming
Inheritance in C++ (protected)
In this lesson, you will learn the latest type of visibility that can be used in C++ inheritance: the protected.
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 : protected person {
// derived class code
};