deque::pop_back
Supprime l'élément à la fin de deque.
void pop_back( );
Notes
Le dernier élément ne doit pas être vide. pop_back ne lève jamais d'exception.
Exemple
// deque_pop_back.cpp
// compile with: /EHsc
#include <deque>
#include <iostream>
int main( )
{
using namespace std;
deque <int> c1;
c1.push_back( 1 );
c1.push_back( 2 );
cout << "The first element is: " << c1.front( ) << endl;
cout << "The last element is: " << c1.back( ) << endl;
c1.pop_back( );
cout << "After deleting the element at the end of the deque, the "
"last element is: " << c1.back( ) << endl;
}
Configuration requise
En-tête: <deque>
Espace de noms : std