title: stl::multimap - how do i get groups of data?
body: <p>Multimap essentially has groups of data sorted by the key. I want a method by which I could access these individual groups and get their aggregate values.
  For example, in a <code>std::multimap&lt; string, int &gt;</code> I store </p>
  
  <pre><code>{"Group1", 1}, 
  {"Group1", 2}, 
  {"Group1", 3}, 
  
  {"Group2", 10}, 
  {"Group2", 11}, 
  {"Group2", 12}
  </code></pre>
  
  <p>Having stored these values, I should be able to iterate this multimap and get the aggregate values of each "group". Problem is there aren't any functions defined in STL to access MultiMaps in such a way. I could use <code>lower_bound</code>, <code>upper_bound</code> to manually iterate the multimap and total the group's contents, but I am hoping there could be better ways already defined in STL ? Can anyone propose a solution as to how I could get the aggregate values for a group in the above example.</p>