By declaring another function named "f" in your class B, you hide the "f" declared in A.
To overload work with inheritance, add a usage directive to your class B.
class B : public A { public: using A::f; void f(float a, int b){ } };
This is because the compiler scans the scope of class B and finds only one method that it should consider when resolving overloads.
source share