typedef std::pair<string, int> beanUnit;
std::vector<beanUnit> vec;
vec.push_back(beanUnit("xuhaitao",36));
vec.push_back(beanUnit("wangerxiao",63));
vec.push_back(beanUnit("jidan", 25));
vec.push_back(beanUnit("mao", 5));
std::vector<beanUnit>::iterator i = vec.begin();
std::vector<beanUnit>::iterator end = vec.end();
while (i != end) {
cout << i->first <<i->second << endl;
++i;
}
FR:hunkxu