Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
return type for 'operator new' must be 'void *'
Remarks
With non-based pointers, overloads of operator new must return void *.
Example
The following example generates C2824:
// C2824.cpp
// compile with: /c
class A {
A* operator new(size_t i, char *m); // C2824
// try the following line instead
// void* operator new(size_t i, char *m);
};