标签:nbsp const return ret second clu iter bsp string
#include <iostream> #include<map> using namespace std; int main() { map<string,int> nameAge; nameAge["sun"]=232; nameAge["sun2"]=23; nameAge["sun1"]=34;
//map 查找 map<string,int> ::const_iterator it =nameAge.find("sun"); if(it!=nameAge.end()){ cout<<it->second; } return 0; }
标签:nbsp const return ret second clu iter bsp string
原文地址:https://www.cnblogs.com/sun5/p/12304618.html