Compiler Error C2574
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at 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();
};
Show: