Kompilatorfel C2524

'destructor' : en destruktor/slutförare måste ha en 'void'-parameterlista

Anmärkningar

Destruktorn eller slutaren hade en parameterlista som inte är void. Andra parametertyper tillåts inte.

Examples

Följande kod återskapar C2524.

// C2524.cpp
// compile with: /c
class A {
   A() {}
   ~A(int i) {}    // C2524
   // try the following line instead
   // ~A() {}
};

Följande kod återskapar C2524.

// C2524_b.cpp
// compile with: /clr /c
ref struct I1 {
protected:
   !I1(int i);   // C2524
   // try the following line instead
   // !I1();
};