다음을 통해 공유


hash_multimap::begin (STL/CLR)

제어되는 시퀀스의 시작을 지정합니다.

    iterator begin();

설명

멤버 함수 제어 되는 시퀀스 또는 빈 시퀀스의 끝 바로 뒤의 첫 번째 요소를 지정 하는 양방향 반복기를 반환 합니다.이를 통해 제어되는 시퀀스의 current 시작을 지정하는 반복기를 가져올 수 있지만 제어되는 시퀀스의 길이가 변경되면 상태가 변경될 수 있습니다.

예제

// cliext_hash_multimap_begin.cpp 
// compile with: /clr 
#include <cliext/hash_map> 
 
typedef cliext::hash_multimap<wchar_t, int> Myhash_multimap; 
int main() 
    { 
    Myhash_multimap c1; 
    c1.insert(Myhash_multimap::make_value(L'a', 1)); 
    c1.insert(Myhash_multimap::make_value(L'b', 2)); 
    c1.insert(Myhash_multimap::make_value(L'c', 3)); 
 
// display contents " [a 1] [b 2] [c 3]" 
    for each (Myhash_multimap::value_type elem in c1) 
        System::Console::Write(" [{0} {1}]", elem->first, elem->second); 
    System::Console::WriteLine(); 
 
// inspect first two items 
    Myhash_multimap::iterator it = c1.begin(); 
    System::Console::WriteLine("*begin() = [{0} {1}]", 
        it->first, it->second); 
    ++it; 
    System::Console::WriteLine("*++begin() = [{0} {1}]", 
        it->first, it->second); 
    return (0); 
    } 
 
  

요구 사항

헤더: < cliext/hash_map >

네임 스페이스: cliext

참고 항목

참조

hash_multimap (STL/CLR)

hash_multimap::end (STL/CLR)