怎么会有116 warning

sms88 2005-05-24 04:47:47
//对单词转换的程序的前半部分进行的编译
#include<map>
#include<string>
#include<iostream>
#include<vector>
using namespace std;

int main()
{
map<string,string> tans_map;
//转换对
typedef map<string,string>::value_type valtype;
tans_map.insert(valtype("s","es")); //把s换成es的对
tans_map.insert(valtype(" a","an"));
tans_map.insert(valtype("e","ed"));

string text[4]={"I ","am"," a"," boy"};
vector<string> textvector(text,text+4);
vector<string>::iterator iter;
cout<<"显示需要改变的文件:";
for(iter=textvector.begin();iter!=textvector.end();++iter)
cout<<*iter;
cout<<"\n";
return 0;
}
...全文
102 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
sms88 2005-05-24
  • 打赏
  • 举报
回复
原来如此而已
catally 2005-05-24
  • 打赏
  • 举报
回复
因为STL比VC出来的晚,所以VC对STL支持不是很好

#include<map>
#include<string>
#include<iostream>
#include<vector>
using namespace std;
都是STL里面的东西,用Devcpp或者其他的比较好
eastred 2005-05-24
  • 打赏
  • 举报
回复
VC6天生有这毛病。
foochow 2005-05-24
  • 打赏
  • 举报
回复
VC6.0编译STL的时候好像都会出现好多警告,对新标准支持得不好
Beover1984 2005-05-24
  • 打赏
  • 举报
回复
把信息贴出来!!!!!!!!!
useresu 2005-05-24
  • 打赏
  • 举报
回复
用dev C++一点问题没有
useresu 2005-05-24
  • 打赏
  • 举报
回复
vc6吧,


环境的问题
sms88 2005-05-24
  • 打赏
  • 举报
回复
#pragma warning(disable: 4786)
你这个是阻止显示"警告"

我就是想知道程序到里有什么地方写得不太规范
eastred 2005-05-24
  • 打赏
  • 举报
回复
加上

#pragma warning(disable: 4786)

这个试试。
ifiew 2005-05-24
  • 打赏
  • 举报
回复
至少要把warning的信息贴个出来看看吧!

64,681

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

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