您的位置:首页 > Web前端 > Node.js

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>
被定义,所以出了这种错误。

不知道会否有其他原因导致这个编译错误。遇到这个问题的朋友可以借鉴一下。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐