Inheritance in C++

1. Relationship between inheritance methods and access qualifiers There are
three types of member access qualifiers: public (public), protected (protected), and private (private).
Three inheritance relationships: public (public inheritance), protected (protected inheritance), private ( private inheritance)
class Person
{
public:
void Display()
{
cout<<_name<

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325167122&siteId=291194637