Possible Duplicate:
A std::map that keep track of the order of insertion?
I am looking for an STL container that preserves order of insertion ( no sorting ) but does not allow duplicates. Is there one? if not any tricks I can use to customize one?
There is no such a container at the moment, but you can create your own one in a cheap way by holding a std::vector
and a std::set
in a class together.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With