adding second part on C++ inheritance