参考博客:https://www.cnblogs.com/BeyondAnyTime/archive/2012/06/05/2537451.html 子类只有虚继承父类,子类才能在自己的类中声明新的虚函数