vector::reserve

vector::reserve

void reserve(size_type n);

The member function ensures that capacity() henceforth returns at least n.

See the related sample program.