Quick Q: Does std::vector resize automatically when inserting new elements?—StackOverflow

Save to:
Instapaper Pocket Readability

Quick A: Yes.

Recently on SO:

Do Vectors resize automatically?

I am very sorry that I am asking such a beginner question but I am finding contradictory information online. I would ask at University but it is out until February next year.

Do Vectors resize automatically? Or do you need to check the current size periodically and resize when you need more room. It looks to be resizing for me automatically but I'm not sure if that is a feature or the compiler waving a magic wand.

Add a Comment

You must sign in or register to add a comment.

Comments (0)

There are currently no comments on this entry.