std::list::push_back
Da cppreference.com
![]() | This page has been machine-translated from the English version of the wiki using Google Translate. The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
void push_back(const T& value ); | ||
void push_back( T&& value ); | (desde C++11) | |
Acrescenta o
value
elemento dado à extremidade do recipiente. Original:
Appends the given element
value
to the end of the container. The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
No iterators or references are invalidated.
Índice |
[editar]Parâmetros
value | - | o valor do elemento a ser anexado Original: the value of the element to append The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[editar]Requisitos
1)value
será CopyInsertable
Original:
value
shall be CopyInsertable
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
value
será MoveInsertable
Original:
value
shall be MoveInsertable
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[editar]Valor de retorno
(Nenhum)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[editar]Complexidade
Constante.
Original:
Constant.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[editar]Exemplo
O código a seguir usa
push_back
para adicionar vários números inteiros para uma std::list<int>: Original:
The following code uses
push_back
to add several integers to a std::list<int>: The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Saída:
42 314159
[editar]Veja também
(C++11) | constrói elementos no lugar, na extremidade Original: constructs elements in-place at the end The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) |
insere elementos no início Original: inserts elements to the beginning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
remove o último elemento Original: removes the last element The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) |