set::end (STL/CLR)

指定受控制序列的結尾。

    iterator end();

備註

成員函式會傳回雙向 iterator 受控制序列結尾之外,只要該點為單位。您用它來取得 iterator,指派受控制序列中 ; 結尾 其狀態沒有變更如果變更受控制序列的長度。

範例

// cliext_set_end.cpp 
// compile with: /clr 
#include <cliext/set> 
 
typedef cliext::set<wchar_t> Myset; 
int main() 
    { 
    Myset c1; 
    c1.insert(L'a'); 
    c1.insert(L'b'); 
    c1.insert(L'c'); 
 
// display initial contents " a b c" 
    for each (wchar_t elem in c1) 
        System::Console::Write(" {0}", elem); 
    System::Console::WriteLine(); 
 
// inspect last two items 
    Myset::iterator it = c1.end(); 
    --it; 
    System::Console::WriteLine("*-- --end() = {0}", *--it); 
    System::Console::WriteLine("*--end() = {0}", *++it); 
    return (0); 
    } 
 
  

需求

標頭: < cliext/設定 >

Namespace: cliext

請參閱

參考

set (STL/CLR)

set::begin (STL/CLR)