Compiler Error C3622
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 C3622.
class' : a class declared as 'keyword' cannot be instantiated
An attempt was made to instantiate a class marked as abstract (or __abstract). A class marked as abstract can be a base class, but it cannot be instantiated.
The following sample generates C3622.
// C3622.cpp
// compile with: /clr
ref class a abstract {};
int main() {
a aa; // C3622
}
The following sample generates C3622.
// C3622_b.cpp
// compile with: /clr:oldSyntax
__abstract class a {
};
int main() {
a aa; // C3622
}
Show: