title: Multiset erase last element
body: <p>I am trying to erase the last element of a multiset using:</p>
  
  <p><code>minheap.erase(minheap.rbegin());</code></p>
  
  <p>It doesn't compile, and gives 4-5 erros.</p>
  
  <p>Note that in C++ multisets, <code>.end()</code> points next to the last element, and not to the last element.</p>
  
  <p>Any ideas?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p><del>Why are this providing different numbers?</del></p>
  
  <pre><code>multiset &lt;int&gt;::reverse_iterator it1 = minheap.rbegin();
  m1=*(++it1);
  
  multiset &lt;int&gt;::iterator it2 = minheap.end();
  m2=*(--it2);
  </code></pre>
  
  <del>
  With some data added in the multiset `m1 is 1` and `m2 is 2` . Why aren't those the same? </del>