开发者

Counting keys in a hash_multimap

What is the most efficient way to count all the different keys in a hash_multimap?

E.g. if I have a al开发者_开发技巧ready filled hash_multimap, (e.g. a container where you can store multiple entities with a same key) how can i retrieve the set of keys?


Insert the keys into a std::set and find the size of the set.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜