开发者

alternative to maps

开发者 https://www.devze.com 2023-01-06 03:06 出处:网络
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

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

精彩评论

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