This documentation is archived and is not being maintained.

Compiler Error C3622

Error Message

'class' : a class declared as 'keyword' cannot be instantiated

An attempt was made to instantiate a class marked as abstract (Visual C++) (or __abstract). A class marked as abstract can be a base class, but it cannot be instantiated.

Example

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: