Compiler Error C2258
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 C2258.
illegal pure syntax, must be '= 0'
A pure virtual function is declared with incorrect syntax.
The following sample generates C2258:
// C2258.cpp
// compile with: /c
class A {
public:
void virtual func1() = 1; // C2258
void virtual func2() = 0; // OK
};
Show: