Examples to explain the inheritance and hide in C++