Different inheritance methods of C++ derived classes have access rights to base classes

After careful sorting, I formed this table. A table illustrating the different inheritance methods of derived classes, access rights to base classes.


as the picture shows
In general, the scope of access to classes is public<protected<private. However, an appropriate inheritance method should be selected in conjunction with a specific project.

Guess you like

Origin blog.csdn.net/TaloyerG/article/details/113073085