子类的虚函数调用base 类的虚函数的情况【c++ primer 】

    技术2022-05-19  19

     

     

    When a derived virtual calls the base-class version, it must do so explicitly using the scope operator. If the derived function neglected to do so, then the call would be resolved at run time and would be a call to itself,

    resulting in an infinite recursion.

     


    最新回复(0)