Today I have encountered a problem: Given that there are multiple equivalent
keys in an instance of std::multimap
, how could we list all of the
corresponding values? For example:
#include <map>
#include <iostream>
int main() {
std::multimap<int, int> xs;
xs.insert(std::make_pair(1, 12));
xs.insert …