This documentation is archived and is not being maintained.

Compiler Warning (level 1) C4624

'derived class' : destructor could not be generated because a base class destructor is inaccessible

A destructor was not accessible in a base class and was therefore not generated for a derived class. Any attempt to create an object of this type on the stack will cause a compiler error.

The following sample generates C4624:

// C4624.cpp
// compile with: /W1
class B
// public:

class D : public B
}; // C4624, make B's destructor public

int main()
   // D d;  this line will cause C2262