The code is below. I have one single function f(), and one single function f(int) in my class D, so why is that call ambiguous if both functions have different parameters?
struct A {
void f() {}
};
struct B: virtual A {
void f(int i) {}
};
struct C: virtual A {
void f() {}
};
struct D: B, C {
};
int main()
{
D d;
d.f(5); //ambiguous
}