Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 535 Bytes

compiler-error-c2846.md

File metadata and controls

23 lines (19 loc) · 535 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2846
Compiler Error C2846
11/04/2016
C2846
C2846
bc090ec2-5410-4112-9ec6-261325374375

Compiler Error C2846

'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
};