共用方式為


deque::end (STL/CLR)

指定受控制序列的結尾。

    iterator end();

備註

成員函式會傳回隨機存取 iterator 受控制序列結尾之外,只要該點為單位。 您會用它來取得指定受控制序列之 current 結尾的 Iterator,但是如果受控制序列的長度變更,它的狀態也會變更。

範例

// cliext_deque_end.cpp 
// compile with: /clr 
#include <cliext/deque> 
 
int main() 
    { 
    cliext::deque<wchar_t> c1; 
    c1.push_back(L'a'); 
    c1.push_back(L'b'); 
    c1.push_back(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 
    cliext::deque<wchar_t>::iterator it = c1.end(); 
    --it; 
    System::Console::WriteLine("*-- --end() = {0}", *--it); 
    System::Console::WriteLine("*--end() = {0}", *++it); 
 
// alter first two items and reinspect 
    *--it = L'x'; 
    *++it = L'y'; 
    for each (wchar_t elem in c1) 
        System::Console::Write(" {0}", elem); 
    System::Console::WriteLine(); 
    return (0); 
    } 
 
  

需求

標頭: < cliext/deque >

Namespace: cliext

請參閱

參考

deque (STL/CLR)

deque::back (STL/CLR)

deque::back_item (STL/CLR)

deque::begin (STL/CLR)