虚函数 覆盖题目原题是Do all of the virtual member functions have to be overridden in the derived class?If not,why?大意是,是否所有的虚函数都要在子类中被覆盖?如果不是,为什么?

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/14 05:14:35

虚函数 覆盖
题目原题是Do all of the virtual member functions have to be overridden in the derived class?If not,why?
大意是,是否所有的虚函数都要在子类中被覆盖?如果不是,为什么?

不是
没有为什么啊,如果子类不需要重写的话,那么就不需要覆盖父类的虚函数了