다음을 통해 공유


hash_map::rend (STL/CLR)

역방향 제어되는 시퀀스의 끝을 지정합니다.

    reverse_iterator rend();

설명

제어 되는 시퀀스의 시작 부분 바로 뒤를 가리키는 역방향 반복기는 멤버 함수를 반환합니다.따라서 역방향 시퀀스의 end를 지정합니다.이를 통해 역순으로 표시된 제어되는 시퀀스의 current 끝을 지정하는 반복기를 가져올 수 있지만 제어되는 시퀀스의 길이가 변경되면 상태가 변경될 수 있습니다.

예제

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

요구 사항

헤더: < cliext/hash_map >

네임 스페이스: cliext

참고 항목

참조

hash_map (STL/CLR)

hash_map::begin (STL/CLR)

hash_map::end (STL/CLR)

hash_map::rbegin (STL/CLR)