共用方式為


編譯器錯誤 C2846

'constructor' :介面不能有建構函式

Visual C++ 介面 不能有建構函式。

下列範例會產生 C2846:

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