This article was previously published under Q95198
This article has been archived. It is offered "as is" and will no longer be updated.
An attempt to compile an application that changes the definition ofthe "new" operator to DEBUG_NEW fails and the compiler generates thefollowing message:
error C2061: syntax error : identifier 'p'
The statement "#define new DEBUG_NEW" precedes an IMPLEMENT_SERIAL or anIMPLEMENT_DYNACREATE macro call.
Modify the source code to place the DEBUG_NEW definition after allstatements that call the IMPLEMENT_SERIAL or IMPLEMENT_DYNCREATEmacros. For more information, see Chapter 15 of the Microsoft VisualC++ "Class Library User's Guide."
This behavior has changed for Visual C++ version 4.0. However, if you buildan application that makes use of DEBUG_NEW with Visual C++ 4.0, and thenattempt to build that application in Visual C++ version 2.x, you will needto move the #define DEBUG_NEW as discussed above.