关于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)
为什么?
...全文
78 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复

24,860

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 工具平台和程序库
社区管理员
  • 工具平台和程序库社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧