learning C++ with Baseclass