Compiler Error C3634
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 C3634.
function' : cannot define an abstract method of a managed or WinRTclass
An abstract method can be declared in a managed or WinRT class, but it cannot be defined.
The following sample generates C3634:
// C3634.cpp
// compile with: /clr
ref class C {
virtual void f() = 0;
};
void C::f() { // C3634 - don't define managed class' pure virtual method
}
Managed Extensions for C++
The following sample generates C3634:
// C3634b.cpp
// compile with: /clr:oldSyntax /LD
#using <mscorlib.dll>
__gc class C {
virtual void f() = 0;
};
void C::f() { // C3634 - don't define managed class' pure virtual method
}
Show: