C++ 容器的一般用例

2022-01-07 00:00:00 containers c++ stl

它可以从 nolyc 获得,它是 Freenode 上 ##C++ 的信息机器人,使用命令容器选择"或容器选择".您在回复中收到的此图片链接位于 adrinael.net,这表明我们应该感谢 Freenode 的 ##C++ 社区成员 Adrinael.

What are the general use cases for the C++ standard library containers?

  • bitset
  • deque
  • list
  • map
  • multimap
  • multiset
  • priority_queue
  • queue
  • set
  • stack
  • vector

For example, a map is generally better for a paired search.

解决方案

A picture is worth a thousand words.

It's available from nolyc, the informative bot of ##C++ on Freenode, using the command "container choice" or "containerchoice". The link to this picture you receive in response is hosted at adrinael.net, which suggests we should thank Adrinael, member of Freenode's ##C++ community.

相关文章