=====resize=====
Syntax:
#include
void resize( size_type num, TYPE val = TYPE() );
The function resize() changes the size of the vector to ''num''. If ''val'' is
specified then any newly-created elements will be initialized to have a value
of ''val''. The contents of the vector up to ''num'' will remain unchanged.
Example:
vector v;
for( int i = 0; i < 10; ++i ) v.push_back(i);
v.resize( 20, 0 ); // adds an additional 10 zeros to the end of v
This function runs in [[/complexity|linear time]].
Related Topics: [[vector_constructors]], [[capacity]], [[size]]