i hate c++ inheritance