随笔 - 87  文章 - 279  trackbacks - 0
<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

潜心看书研究!

常用链接

留言簿(19)

随笔分类(81)

文章分类(89)

相册

ACM OJ

My friends

搜索

  •  

积分与排名

  • 积分 - 211906
  • 排名 - 116

最新评论

阅读排行榜

评论排行榜

#include<iostream>
#include<map>
#include<string>
#include<iterator>
using   namespace   std;
typedef   map<string,string>maps;
typedef   pair<string,string>pr;
int   main()
{
maps   temp;
temp.insert(pr("aa","aaaaa"));
temp.insert(pr("bb","bbbbbb"));
temp.insert(pr("cc","cccc"));
maps   tent;
maps::iterator   it;
for(it=temp.begin();it!=temp.end();++it)tent.insert(*it);
for(it=tent.begin();it!=tent.end();++it)
{
cout<<(*it).first<<"   "<<(*it).second<<endl;
}
return   0;
}

posted on 2006-03-04 14:45 阅读(8282) 评论(3)  编辑 收藏 引用 所属分类: Basic C++

FeedBack:
# re: map 用法 2008-12-11 21:27 qeq
什么啊,那么乱,改好点  回复  更多评论
  
# re: map 用法 2009-05-28 19:56 aa
不错...  回复  更多评论
  
# re: map 用法 2009-09-25 08:37 xsd
yiban   回复  更多评论
  

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理