C++Primer 练习11.31

/*
*author @alex
*title C++Primer 练习11.31
*/


int main(int argc, char **argv) {
	multimap<string, string> immp = { {"k","1"},{"k","2"},{"d","1"} };
	for (auto pos = immp.equal_range("k"); pos.first != pos.second;)
		pos.first=immp.erase(pos.first);
	for (auto i : immp)
		cout << i.first << " " << i.second << endl;
}

猜你喜欢

转载自blog.csdn.net/dididisailor/article/details/82836149