Compiler Error C2251

'identifier' : defined but not declared

The specified destructor was defined, but not declared in the class body. A compiler-generated destructor is used if a destructor declaration is not in the class body.

The following is an example of this error:

class C
{
  C();     // only a constructor is declared
};

C::C() {}  // OK, constructor is defined

C::~C()    // undeclared destructor definition
{          // error on this line
}