I'm writing some c++ code which looks like:
class Base {
public:
virtual ~Base() {}
void foo(int a) {}
virtual void foo(int a, int b) = 0;
};
class Derived: public Base {
public:
virtual void foo(int a, int b) {}
};
int main()
{
Derived o;
o.foo(1);
return 0;
}
This produces the following error:
candidate expects 2 arguments, 1 provided
At first I thought of a compilator bug, but after trying with different ones and always getting the same result, I realize it must be part of the standard. Can somebody please point out the reason for that error?