Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Warning (level 1) C4624
Collapse the table of content
Expand the table of content

Compiler Warning (level 1) C4624

Error Message

'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 /c
class B {
// Uncomment the following line to resolve.
// public:
   ~B();
};

class D : public B {};   // C4624 B's destructor not public

Community Additions

ADD
Show:
© 2015 Microsoft