What is the difference between
public
,private
, andprotected
inheritance in C++?
All of the questions I've found on SO deal with specific cases.
access-specifierc++c++-faqencapsulationinheritance
What is the difference between
public
,private
, andprotected
inheritance in C++?
All of the questions I've found on SO deal with specific cases.
Best Solution
IMPORTANT NOTE: Classes B, C and D all contain the variables x, y and z. It is just question of access.
About usage of protected and private inheritance you could read here.