共用方式為


hash_multimap::end (STL/CLR)

指定受控制序列的結尾。

    iterator end();

備註

在受控制序列之結尾點的成員函式傳回雙向 Iterator。 您會受控制序列之結尾的它來取得 Iterator;不是它的狀態 doesn 變更,如果受控制序列的長度變更。

範例

// cliext_hash_multimap_end.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 last two items 
    Myhash_multimap::iterator it = c1.end(); 
    --it; 
    --it; 
    System::Console::WriteLine("*-- --end() = [{0} {1}]", 
        it->first, it->second); 
    ++it; 
    System::Console::WriteLine("*--end() = [{0} {1}]", 
        it->first, it->second); 
    return (0); 
    } 
 
  

需求

標題: <cliext/hash_map>

命名空間: cliext

請參閱

參考

hash_multimap (STL/CLR)

hash_multimap::begin (STL/CLR)