赞
踩
- #include <map>
- #include <string>
- #include <iostream>
-
- Using namespace std;
-
- Int main()
-
- {
-
- Map<int, string> mapStudent;
-
- mapStudent.insert(pair<int, string>(1, “student_one”));
-
- mapStudent.insert(pair<int, string>(2, “student_two”));
-
- mapStudent.insert(pair<int, string>(3, “student_three”));
-
- map<int, string>::iterator iter;
-
- iter = mapStudent.find(1);
-
- if(iter != mapStudent.end())
-
- {
-
- Cout<<”Find, the value is ”<<iter->second<<endl;
-
- }
-
- Else
-
- {
-
- Cout<<”Do not Find”<<endl;
-
- }
-
- }
百度云盘:链接:https://pan.baidu.com/s/11b634VvKMIsGdahyBLpZ3Q 提取码:6666
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。