Export (0) Print
Expand All
Expand Minimize

Compiler Error C2815

Error Message

'operator delete' : first formal parameter must be 'void *', but 'param' was used

Any user-defined operator delete function must take a first formal parameter of type void *.

The following sample generates C2815:

// C2815.cpp
// compile with: /c
class CMyClass {
   void mf1(int *a);
   void operator delete(CMyClass *);   // C2815
   void operator delete(void *); 

Community Additions

© 2014 Microsoft