deepkamal's blog

By deepkamal, history, 4 years ago, In English

I am implementing an ordered multiset but I am not able to erase elements from it . https://ideone.com/pnx4R3 From above code, after erasing the number of elements shown are same as without erasing .

  • Vote: I like it
  • +3
  • Vote: I do not like it

»
4 years ago, # |
  Vote: I like it +4 Vote: I do not like it

You should instead use an ordered set of pairs, such that the second value differentiate the keys. To erase, you can do something like this: https://pastebin.com/qtqHJxne