Compiler Error C2458

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Error C2458.

identifier' : redefinition within definition

A class, structure, union, or enumeration is redefined in its own declaration.

The following sample generates C2458:

// C2458.cpp  
class C {  
   enum i { C };   // C2458  
};  

Show: