title: What is the usage of std::multimap?
body: <p>I've just started learning STL containers, and I cannot understand why <code>std::multimap</code> exists. With <code>std::map</code>, we can access values by user-defined keys, but with <code>std::multimap</code> we cannot do that as the latter does not even have an overloaded <code>operator[]</code> and the same key can be mapped to several different values. To me, this looks like <code>std::multimap</code> is essentialy just something like <code>std::multiset&lt;std::pair&lt;K, V&gt;&gt;</code> with the <code>Compare</code> function operating on the <code>K</code> and we lose the main feature of a map which is the ability to access elements by key (as I see it). I've found <a href="https://stackoverflow.com/questions/6456882/use-cases-of-stdmultimap">this post</a>, but still couldn't comprehend the usecases given here. Could someone please give me several examples when we would use <code>std::multimap</code>?</p>