关于stl和mfc

lhcy_0 2004-02-18 03:37:19
怎么在mfc中用stl?

比如我在mfc的一个类中用如下语句:
#include<iostream>
报错:syntax error : identifier 'THIS_FILE'
d:\microsoft visual studio\vc98\include\new(35) : error C2091: function returns function
d:\microsoft visual studio\vc98\include\new(35) : error C2809: 'operator new' has no formal parameters
d:\microsoft visual studio\vc98\include\new(36) : error C2061: syntax error : identifier 'THIS_FILE'
d:\microsoft visual studio\vc98\include\new(37) : error C2091: function returns function
d:\microsoft visual studio\vc98\include\new(37) : error C2556: 'void *(__cdecl *__cdecl operator new(void))(unsigned int,const struct std::nothrow_t &)' : overloaded function differs only by return type from 'void *(__cdecl *__cdecl operator new(voi
d))(unsigned int)'
d:\microsoft visual studio\vc98\include\new(35) : see declaration of 'new'
d:\microsoft visual studio\vc98\include\new(41) : error C2061: syntax error : identifier 'THIS_FILE'
d:\microsoft visual studio\vc98\include\new(42) : error C2091: function returns function
d:\microsoft visual studio\vc98\include\new(42) : error C2556: 'void *(__cdecl *__cdecl operator new(void))(unsigned int,void *)' : overloaded function differs only by return type from 'void *(__cdecl *__cdecl operator new(void))(unsigned int)'
d:\microsoft visual studio\vc98\include\new(35) : see declaration of 'new'
d:\microsoft visual studio\vc98\include\new(42) : error C2809: 'operator new' has no formal parameters
d:\microsoft visual studio\vc98\include\new(42) : error C2065: '_P' : undeclared identifier
Error executing cl.exe.

GA.obj - 11 error(s), 0 warning(s)
为什么?
...全文
46 点赞 收藏 5
写回复
5 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复

还没有回复,快来抢沙发~

相关推荐
发帖
工具平台和程序库
创建于2007-09-28

2.4w+

社区成员

C/C++ 工具平台和程序库
申请成为版主
帖子事件
创建了帖子
2004-02-18 03:37
社区公告
暂无公告