cpp inheritance test