다음을 통해 공유


front_insert_iterator::operator++

Increments the back_insert_iterator to the next location into which a value may be stored.

front_insert_iterator<Container>& operator++( );
front_insert_iterator<Container> operator++( int );

반환 값

A front_insert_iterator addressing the next location into which a value may be stored.

설명

Both preincrementation and postincrementation operators return the same result.

예제

// front_insert_iterator_op_incre.cpp
// compile with: /EHsc
#include <iterator>
#include <list>
#include <iostream>

int main( )
{
   using namespace std;

   list<int> L1;
   front_insert_iterator<list<int> > iter ( L1 );
   *iter = 10;
   iter++;
   *iter = 20;
   iter++;
   *iter = 30;
   iter++;

   list <int>::iterator vIter;
   cout << "The list L1 is: ( ";
   for ( vIter = L1.begin ( ) ; vIter != L1.end ( ); vIter++ )
      cout << *vIter << " ";
   cout << ")." << endl;
}
  

요구 사항

헤더: <iterator>

네임스페이스: std

참고 항목

참조

front_insert_iterator 클래스

표준 템플릿 라이브러리