다음을 통해 공유


multimap::cbegin

Multimap에서 첫 번째 요소의 주소는 const 반복기를 반환 합니다.

const_iterator cbegin( ) const;

반환 값

주소 지정을 첫 번째 요소에서 상수 양방향 반복기는 multimap Class 또는 이후 빈 위치 multimap.

주석

반환 값의 cbegin, 요소에는 multimap 개체를 수정할 수 없습니다.

예제

// multimap_cbegin.cpp
// compile with: /EHsc
#include <map>
#include <iostream>

int main( )
{
   using namespace std;   
   multimap <int, int> m1;

   multimap <int, int> :: const_iterator m1_cIter;
   typedef pair <int, int> Int_Pair;

   m1.insert ( Int_Pair ( 0, 0 ) );
   m1.insert ( Int_Pair ( 1, 1 ) );
   m1.insert ( Int_Pair ( 2, 4 ) );

   m1_cIter = m1.cbegin ( );
   cout << "The first element of m1 is " << m1_cIter -> first << endl;
   }
  

요구 사항

헤더: <map>

네임 스페이스: std

참고 항목

참조

multimap Class

표준 템플릿 라이브러리