Expand Minimize
1 out of 4 rated this helpful - Rate this topic

Compiler Error C2872

'symbol' : ambiguous symbol

The compiler cannot determine which symbol you are referring to.

The following sample generates C2872:

// C2872.cpp
namespace A
{
   int i;
}

using namespace A;
int i;
void z()
{
   ::i++;   // ok
   A::i++;   // ok
   i++;   // C2872, ::i or A::i?
}
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.