Skip to content

Latest commit

 

History

History
41 lines (34 loc) · 839 Bytes

compiler-error-c2524.md

File metadata and controls

41 lines (34 loc) · 839 Bytes
descriptiontitlems.datef1_keywordshelpviewer_keywordsms.assetid
Learn more about: Compiler Error C2524
Compiler Error C2524
11/04/2016
C2524
C2524
e71d17f5-2fc2-416b-8dbd-e9bed85eb33a

Compiler Error C2524

'destructor' : a destructor/finalizer must have a 'void' parameter list

The destructor or finalizer had a parameter list that is not void. Other parameter types are not allowed.

Examples

The following code reproduces C2524.

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

The following code reproduces C2524.

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