In C++, when a class is derived from another one, you can specify the inheritance relationship as public, private or even protected.
What are the main differences a between these types of inheritance in C++? How does a public inheritance differ from a private inheritance?
Note: Some programming languages, unlike C++, allow only public inheritance. Java for example allows only public inheritance.