resize [C++ Reference]
Keywords: stl,list,resize
Date: 2009-07-25T04:42:21-0700

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

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

## resize

Syntax:

        #include <list>
        void resize( size_type size, const TYPE& val = TYPE() );

The resize method changes the size of the list to `size`. If `val` is specified then any newly-created elements will be initialized to have a value of `val`.

This function runs in linear time.

Related Topics: size

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