Namespaces
Variants
Views
Actions

std::valarray::resize

From cppreference.com
< cpp‎ | numeric‎ | valarray
Revision as of 23:21, 31 May 2013 by P12bot (Talk | contribs)

 
 
 
 
void resize( std::size_t count, T value = T() );

Resizes the valarray to contain count elements.

If the current size is less than count, additional elements are appended and initialized with value.

If the current size is greater than count, the valarray is reduced to its first count elements.

Contents

Parameters

count - new size of the container
value - the value to initialize the new elements with

Return value

(none)

Example

See also

returns the size of valarray
(public member function) [edit]