Question

How can I get the first N elements from a multiset structure, without constantly getting the first (.begin()) element and then erasing it?

I just want to sum the first N elements without affecting the multiset.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top