PRB: C2061 Error Generated When DEBUG_NEW Used in ApplicationLast reviewed: July 10, 1997Article ID: Q95198 |
7.00 | 1.00 1.50 1.51 1.52 | 1.00 2.00 2.10
MS-DOS | WINDOWS | WINDOWS NTkbprg kbprb The information in this article applies to:
SYMPTOMSAn attempt to compile an application that changes the definition of the "new" operator to DEBUG_NEW fails and the compiler generates the following message:
error C2061: syntax error : identifier 'p' CAUSEThe statement "#define new DEBUG_NEW" precedes an IMPLEMENT_SERIAL or an IMPLEMENT_DYNACREATE macro call.
RESOLUTIONModify the source code to place the DEBUG_NEW definition after all statements that call the IMPLEMENT_SERIAL or IMPLEMENT_DYNCREATE macros. For more information, see Chapter 15 of the Microsoft Visual C++ "Class Library User's Guide."
MORE INFORMATIONThis behavior has changed for Visual C++ version 4.0. However, if you build an application that makes use of DEBUG_NEW with Visual C++ 4.0, and then attempt to build that application in Visual C++ version 2.x, you will need to move the #define DEBUG_NEW as discussed above.
|
Additional reference words: 1.00 1.50 2.00 2.10 2.50 2.51 2.52 3.00 3.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |