11.15
mapped_type : vector< int >
key_type : int
value_type : std::pair< int, vector<int> >
11.16
std::map<int, std::string> map;
map[10010] = "132";
std::map<int, std::string>::iterator it = map.begin();
it->second = "131";
11.17
copy(v.begin(), v.end(), inserter(c, c.end())); // 合法
copy(v.begin(), v.end(), back_inserter(c)); // 不合法,multiset没有push_back。
copy(c.begin(), c.end(), inserter(v, v.end())); // 合法
copy(c.begin(), c.end(), back_inserter(v)); // 合法
11.18
std::map<std::string, size_t>::const_iterator;
11.19
using compareType = bool (*)(const Sales_data &lhs, const Sales_data &rhs);
std::multiset<Sales_data, compareType> bookstore(compareIsbn);
std::multiset<Sales_data, compareType>::iterator c_it = bookstore.begin();