equal_range用法
2016-09
睿丰德RFID软件系统集成商
- // map::equal_elements
- #include <iostream>
- #include <map>
- using namespace std;
- int main ()
- {
- map<char,int> mymap;
- pair<map<char,int>::iterator,map<char,int>::iterator> ret;
- mymap['a']=10;
- mymap['b']=20;
- mymap['c']=30;
- ret = mymap.equal_range('b');
- cout << "lower bound points to: ";
- cout << ret.first->first << " => " << ret.first->second << endl;
- cout << "upper bound points to: ";
- cout << ret.second->first << " => " << ret.second->second << endl;
- return 0;
- }
- lower bound points to: 'b' => 20
- upper bound points to: 'c' => 30
RFID管理系统集成商 RFID中间件 条码系统中间层 物联网软件集成