deque::pop_front

요소는 있지 않은 deque의 시작 부분을 삭제합니다.

void pop_front( );

설명

첫 번째 요소는 비어 있어야 합니다.pop_front예외를 throw 하지 않습니다.

예제

// deque_pop_front.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 second element is: " << c1.back( ) << endl;

   c1.pop_front( );
   cout << "After deleting the element at the beginning of the "
      "deque, the first element is: " << c1.front( ) << endl;
}
  

요구 사항

헤더: <deque>

네임 스페이스: std

참고 항목

참조

deque Class

deque::push_front 및 deque::pop_front

표준 템플릿 라이브러리