reserve [C++ Reference]
Keywords: stl,vector,reserve
Date: 2008-10-14T15:42:10-0700

[[reserve]]
C++ Reference
Translations of this page?:

- en
- br-pt
- cn
- fr
- it
- jp
- pl
- ru
- tr

## 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: capacity

Edit this page • Old revisions
• • • Login • Index • Recent changes • RSS • cc •