Compiler Error C2574
'destructor' : cannot be declared static
Neither destructors nor constructors can be declared static
.
The following sample generates C2574:
// C2574.cpp
// compile with: /c
class A {
virtual static ~A(); // C2574
// try the following line instead
// virtual ~A();
};
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for