This documentation is archived and is not being maintained.

Compiler Error C2460

Error Message

'identifier1' : uses 'identifier2', which is being defined

A class or structure (identifier2) is declared as a member of itself (identifier1). Recursive definitions of classes and structures are not allowed.

The following sample generates C2460:

// C2460.cpp
class C {
   C aC;    // C2460