运行后,对我的输入,没有输出,为何???

zhuliangsu 2003-09-11 12:37:09
运行后,对我的输入,没有输出,为何???
#include <iostream>
#include <string>
#include <set>

using namespace std;

typedef set<string,less<string> >str_set;

void main()
{
string name[]={"Mary","John","Ann","Joe","Ken"};

str_set s(name,name+5);

string search,upper,lower;
str_set::iterator iter;


cout<<"please input a range for searching:(Upper/Lower)\n";
cin>>upper>>lower;

for(iter=s.lower_bound(lower);iter!=s.upper_bound(upper);iter++)
cout<<*iter<<" ";//好想没执行????

cout<<endl;
}
...全文
70 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

69,380

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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