deque::pop_back
刪除這個項目在雙向佇列的結尾。
void pop_back( );
備註
最後一個項目不能是空的。 pop_back不擲回例外狀況。
範例
// 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;
}
需求
標頭: <deque>
命名空間: std