注册 登录
编程论坛 C++教室

提示遇到问题需要关闭是什么意思啊

crazyc 发布于 2007-03-18 08:13, 596 次点击

#pragma warning(disable:4876)
#include<iostream>
#include<string>
#include<map>
using namespace std;
typedef map<int ,string , less<int> > INT2STRING;
void main()
{
INT2STRING theMap;
INT2STRING::iterator theIterator;
string theString="";
int index;
theMap.insert(INT2STRING::value_type(0,"zero"));
theMap.insert(INT2STRING::value_type(1,"one"));
theMap.insert(INT2STRING::value_type(2,"two"));
theMap.insert(INT2STRING::value_type(3,"three"));
theMap.insert(INT2STRING::value_type(4,"four"));
theMap.insert(INT2STRING::value_type(5,"five"));
theMap.insert(INT2STRING::value_type(6,"six"));
theMap.insert(INT2STRING::value_type(7,"seven"));
theMap.insert(INT2STRING::value_type(8,"eight"));
theMap.insert(INT2STRING::value_type(9,"nine"));
for( ; ;)
{
cout<<"Enter \"q\" to quit,or enter a Number:";
cin>>theString;
if(theString=="q")
break;
for(index=0;index<theString.length ();index++)
{
theIterator!=theMap.find(theString[index]-'0');
if(theIterator!=theMap.end())
cout<<(*theIterator).second<<" ";
else
cout<<"[err]";

}
cout<<endl;

}
}

提示遇到问题需要关闭是什么意思啊

2 回复
#2
Arcticanimal2007-03-24 20:04
程序崩溃了
#3
yuyunliuhen2007-03-24 20:30
运行的时候进程都被死锁了?
1