In which scenario do I use a particular STL container?

后端 未结 10 1055
遥遥无期
遥遥无期 2020-11-22 00:31

I\'ve been reading up on STL containers in my book on C++, specifically the section on the STL and its containers. Now I do understand each and every one of them have their

10条回答
  •  一个人的身影
    2020-11-22 01:01

    Simple answer: use std::vector for everything unless you have a real reason to do otherwise.

    When you find a case where you're thinking, "Gee, std::vector doesn't work well here because of X", go on the basis of X.

提交回复
热议问题