Skip to content

Latest commit

 

History

History
24 lines (20 loc) · 553 Bytes

compiler-error-c2459.md

File metadata and controls

24 lines (20 loc) · 553 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2459
Compiler Error C2459
11/04/2016
C2459
C2459
81e29f4c-5b60-40fb-9557-1cdc630d77e8

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; };
};