Re: Ambigous!!! But why???
The compiler detects ambiguities by performing tests in this order:
- If access to the name is ambiguous, an error message is generated.
- If overloaded functions are unambiguous, they are resolved.
- If access to the name violates member-access permission, an error message is generated.
The names are checked before the access permission.
You can get rid of it by using:
Code:
Derived d;
int i = d.Base1::myFunc();
Re: Ambigous!!! But why???
You can also get rid of it using "using"
Code:
class Derived : public Base1, public Base2
{
public:
using Base2::myFunc();
};