#include #include #include struct comparestrings { bool operator()(const std::string & left, const std::string & right) const { return left.compare(right); } }; main() { std::multimap testmap; testmap.insert(std::pair("key1", "value1")); std::cerr << testmap.count("key2") << std::endl; // <-- why does this print "1"?!?! }