Overload of pure virtual function

后端 未结 6 642
无人及你
无人及你 2021-01-12 23:45

I usually use pure virtual functions for those methods that are required by my code to work well. Therefore, I create interfaces and then other users implement their derived

6条回答
  •  青春惊慌失措
    2021-01-13 00:00

    It is not overriding as the function signatures are different. According to polymorphism rule to override a function the function signatures and types should be same.

    In this case these functions are different. virtual void foo(int,double)=0; virtual void foo(int, double, double);

提交回复
热议问题