What's the different between std::multimap<key, value> and

F

fish

I found that they have one key and multiple values which is unique.
Anyone supplement?
 
F

fish

Well, aside from the different layout, std::set<value> enforces the
uniqueness of the value type, while the multimap may have multiple instances
of value. So, multiple instances of a value would have to be stored in
different multimap entries.

A more closer analogue to std::multimap<key, value> would be a std::map<key,
std::multiset<value> >.

 application_pgp-signature_part
< 1K查看下载

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top