Namespaces
Variants
Views
Actions

Difference between revisions of "Template:cpp/container/push back"

From cppreference.com
(testing generic example)
(added some formatting)
Line 29: Line 29:
 
{{example}}
 
{{example}}
 
{{example cpp
 
{{example cpp
  | The following code uses push_back to add several integers to a {{tt|std::{{{1}}}<int>}}:
+
  | The following code uses {{tt|push_back}} to add several integers to a {{tt|std::{{{1}}}<int>}}:
 
  | code=
 
  | code=
 
#include <{{{1}}}>
 
#include <{{{1}}}>

Revision as of 06:00, 4 July 2011

Template:cpp/container//sidebar Template:ddcl list begin <tr class="t-dcl ">

<td >
void push_back( const T& value );
</td>

<td class="t-dcl-nopad"> </td> <td > Template:cpp/container/mark c++0x feature </td> </tr> <tr class="t-dcl ">

<td >
void push_back( T&& value );
</td>

<td class="t-dcl-nopad"> </td> <td > Template:mark c++0x feature </td> </tr> Template:ddcl list end

Appends the given element value to the end of the container.

Template:params

value - the value of the element to append

Template:returns Template:return none

Template:complex Template:complex constant.

Template:example cpp

Template:see also

Template:cpp/container/dcl list emplace backTemplate:cpp/container/dcl list push frontTemplate:cpp/container/dcl list pop back