Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Error C2523
Collapse the table of content
Expand the table of content

Compiler Error C2523

'class::~identifier' : destructor/finalizer tag mismatch

The name of the destructor must be the class name preceded by a tilde (~). The constructor and destructor are the only members that have the same name as the class.

The following sample generates C2523:

// C2523.cpp
// compile with: /c
class A {
   ~B();    // C2523
   ~A();   // OK

Community Additions

© 2015 Microsoft