Array of objects vs. array of pointers

Pages: 12
I'm pretty sure I just made it clear that I would use it to dynamically add strings, but never mind, I will probably just settle for deque.
Schulter wrote:
I'm pretty sure I just made it clear that I would use it to dynamically add strings
In terms of choosing the best container for the job, this is as vague as it gets. "I want to dynamically add things to it". Well, yeah, that's pretty much what 95% of containers do.

My three favorite containers are std::vector, std::map, and std::set. I usually never have performance problems significant enough to warrant switching to another container, so the decision as to which container to use is easy: whichever one organizes data the way I want. Efficiency only comes into play when I start getting performance issues on my minspec machine.
Topic archived. No new replies allowed.
Pages: 12