array::end

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

reference end();
const_reference end() const;

설명

멤버 함수는 시퀀스의 끝 바로 뒤를 가리키는 임의 액세스 반복기를 반환합니다.

예제

 

// std_tr1__array__array_end.cpp 
// compile with: /EHsc 
#include <array> 
#include <iostream> 
 
typedef std::array<int, 4> Myarray; 
int main() 
    { 
    Myarray c0 = {0, 1, 2, 3}; 
 
// display contents " 0 1 2 3" 
    for (Myarray::const_iterator it = c0.begin(); 
        it != c0.end(); ++it) 
        std::cout << " " << *it; 
    std::cout << std::endl; 
 
// display last element " 3" 
    Myarray::iterator it2 = c0.end(); 
    std::cout << " " << *--it2; 
    std::cout << std::endl; 
 
    return (0); 
    } 
 
  

요구 사항

헤더: <array>

네임 스페이스: 국방 표준

참고 항목

참조

<array>

array Class (TR1)

array::back

array::begin

기타 리소스

<array> 멤버