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

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

Comments are closed.

Comments (0)

There are currently no comments on this entry.