xtree ( 1317 ) : error C2061: syntax error : identifier '_Wherenode'
2011-04-08 14:30
411 查看
xtree(1317) : error C2061: syntax error : identifier '_Wherenode'
今天用VS2008编译一个用到Map的程序时,报了上面的错。在网上找到了原因:
1. OK
#include <map>
#include <utility>
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
2. Error
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
#include <map>
#include <utility>
因为我启用了VS自带的内存泄漏检测功能,所以定义了以下代码
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
在头文件引用展开后,这段代码先于
#include <map>
#include <utility>
被定义,所以出了这种错误。
不知道会否有其他原因导致这个编译错误。遇到这个问题的朋友可以借鉴一下。
今天用VS2008编译一个用到Map的程序时,报了上面的错。在网上找到了原因:
1. OK
#include <map>
#include <utility>
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
2. Error
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
#include <map>
#include <utility>
因为我启用了VS自带的内存泄漏检测功能,所以定义了以下代码
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
在头文件引用展开后,这段代码先于
#include <map>
#include <utility>
被定义,所以出了这种错误。
不知道会否有其他原因导致这个编译错误。遇到这个问题的朋友可以借鉴一下。
相关文章推荐
- vs2010 库函数问题:objidl.h(11266) : error C2061: syntax error : identifier '__RPC__out_xcount_part'
- 编译时遇到如下错误error C2061: syntax error : identifier 'THIS_FILE'
- vs2010 库函数问题:objidl.h(11266) : error C2061: syntax error : identifier '__RPC__out_xcount_part'
- 2014-04-08工作日志:error C2061: syntax error : identifier 'LPPROFILEINFO'
- 编译时遇到如下错误error C2061: syntax error : identifier 'THIS_FILE'
- 编译时遇到如下错误error C2061: syntax error : identifier 'THIS_FILE'
- 编译时遇到如下错误error C2061: syntax error : identifier 'THIS_FILE'
- 【转】编译时遇到如下错误error C2061: syntax error : identifier 'THIS_FILE'
- 编译过程中弹出new(35) : error C2061: syntax error : identifier 'THIS_FILE'问题的原因及解决方法
- error C2061: syntax error : identifier 'BinryTreeNode'
- ORACLE 11G 触发器调试记录Error: PLS-00201: identifier'SYS.DBMS_SYSTEM' must be declared
- C和C++混合编程(error C2059: syntax error : 'string')
- Code Sign error: Application Identifier 'xxx' which doesn't match the current setting 'xxx'
- 关于syntax error : missing ';' before identifier 'PVOID64' 问题
- winnt.h C2146 error C2146: syntax error : missing ';' before identifier 'PVOID64' 又一可能的解决方案
- 20140624:error:error C2065: 'sprintf' : undeclared identifier
- 解决VC提示 syntax error : identifier 'LONG_PTR'错误的方法
- error C2146: syntax error : missing ';' before identifier 'fd'
- VS2008下编译错误(error C2065: '_S1max' : undeclared identifier)的解决办法
- 解决VC提示 syntax error : identifier 'LONG_PTR'错误的方法