共用方式為


編譯器錯誤 C3266

'class' : 類別建構函式不接受參數,必須使用 'void' 參數清單

備註

類別中的類別建構函式使用 /clr 程式設計無法使用參數。

Example

下列範例會產生 C3266:

// C3266.cpp
// compile with: /clr

ref class X {
   static X(int i) { // C3266
   // try the following line instead
   // static X() {
   }
};

int main() {
}