Resize

resize()

To dynamically resize a vector while program is executing and size is not known during compile time.

vctr.resize(N);  // Allocates N elements for vector vctr.

resize is now adding new slots on top of existing elements, rather it just states that "THIS is how many elements are in this vector". If the resize value is smaller than the vectors current size, all elements in indexes larger than N are destroyed and N is now the size of the vector.