Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Compiler Error C2459

'identifier' : is being defined; cannot add as an anonymous member

A class, structure, or union is redefined in its own scope by a member of an anonymous union.

The following sample generates C2459:

// C2459.cpp
// compile with: /c
class C {
   union { int C; };   // C2459
   union { int D; };
};
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.