我认为它是因为基类数据成员和方法不可访问,但我想更清楚一点.另外,这是多态(使用虚函数)只能在公共继承下才可能的原因吗?
c++ inheritance pointers
c++ ×1
inheritance ×1
pointers ×1