Why do I need to redeclare overloaded virtual functions?
问题 I have a base class with two overloaded functions f(void) and f(int) . The class Derived implements f(int) by calling f(void) . Derived2 implements f(void) only. The compiler rejects the implementation Derived::f(int) because it wants to call f(int) but I provided no arguments because I want to call f(void) . Why does the compiler reject it? Why does adding the line virtual int f(void) = 0; fix my problem? class Base { public: explicit Base(void) {} virtual ~Base(void) {} virtual int f(void)