开发者

alternative to maps

Since maps dont allow duplicate values . Are there any other containers that are part of C++ standard library that allow du开发者_如何学编程plicates that store values by key value pair?


You can use std::multimap

Multimap is a Sorted Associative Container that associates objects of type Key with objects of type Data. multimap is a Pair Associative Container, meaning that its value type is pair. It is also a Multiple Associative Container, meaning that there is no limit on the number of elements with the same key.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜