reserve

C/C++ Reference

reserve
Syntax:
  #include <vector>
  void reserve( size_type size );

The reserve() function sets the capacity of the vector to at least size.

reserve() runs in linear time.

Related topics: