上一页 1 ··· 49 50 51 52 53 54 55 56 57 ··· 99 下一页

2011年7月28日

map find

摘要: #include <stdio.h>#include <iostream>#include <stdlib.h>#include <map>using namespace std;int main( ){ map<int,string>mp; mp[0] = "beijing"; mp[1] = "shanghai"; mp[2] = "shenzhen"; map<int,string>::iterator iter; iter = mp.find(1); if 阅读全文

posted @ 2011-07-28 21:59 more think, more gains 阅读(143) 评论(0) 推荐(0) 编辑

map 查找1

摘要: #include <stdio.h>#include <string.h>#include <algorithm>#include <map>#include <stdlib.h>#include <iostream>#include <string>using namespace std;int main( ){ map<string,int>mp; mp.insert(pair<string,int>("beijing",50)); mp.insert(pair& 阅读全文

posted @ 2011-07-28 21:49 more think, more gains 阅读(175) 评论(0) 推荐(0) 编辑

stl map3

摘要: #include <stdio.h>#include <iostream>#include <map>#include <algorithm>using namespace std;int main( ){ //用insert函数插入value_type 数据 map<int,string>stu; int n, i; stu.insert(map<int,string>::value_type(1,"bcdefg")); stu.insert(map<int,string>::value_ 阅读全文

posted @ 2011-07-28 21:38 more think, more gains 阅读(144) 评论(0) 推荐(0) 编辑

小白 stl map

摘要: #include <iostream>#include <map>#include <vector>#include <string>#include <algorithm>#include <queue>using namespace std;#define INF 0x7f7f7f7fint N, cnt, beg, end, v;int g[155][155], res[155]; char s[33], e[33]; map <string, int> mp;struct Bus { int pos, 阅读全文

posted @ 2011-07-28 21:06 more think, more gains 阅读(166) 评论(0) 推荐(0) 编辑

stl map2

摘要: #include <stdio.h>#include <map>#include <iostream>using namespace std;// 用insert插入数据时,当map中有这个关键字时,insert是插入不了的数据的。// 但用数组它可以覆盖以前关键字对应的值int main( ){ map<int,string> stu,stu2; stu[1] = "boy1"; stu[1] = "boy2"; stu[2] = "boy3"; map<int,string&g 阅读全文

posted @ 2011-07-28 21:04 more think, more gains 阅读(98) 评论(0) 推荐(0) 编辑

上一页 1 ··· 49 50 51 52 53 54 55 56 57 ··· 99 下一页

导航