NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error C2506

'class::identifier' : ambiguous

The name refers to more than one class member. An expression used to access a base class or structure must refer to a unique function, object, type, or enumerator. The scope-resolution operator (::) can be used to resolve the ambiguity.

Ambiguity is checked before access control. A private base class containing only private members can cause ambiguity as well as a public class.

Example

class A
{
public:
   int a;
};
class B
{
private:
   int a;
};
class C : public A, private B { };
C c;
int j = c.a;          // error, could be A::a or B::a
int i = c.A::a;       // OK, resolved ambiguity