Export (0) Print
Expand All
Expand Minimize

Compiler Error C2846

Error Message

'constructor' : an interface cannot have a constructor

A Visual C++ interface cannot have a constructor.

The following sample generates C2846:

// C2846.cpp
// compile with: /c
__interface C {
   C();   // C2846 constructor not allowed in an interface
};

Community Additions

ADD
Show:
© 2015 Microsoft