array::const_reverse_iterator
제어 되는 시퀀스에 있는 상수 역방향 반복기의 형식입니다.
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
설명
상수 역방향 반복기 제어 되는 시퀀스에 사용할 수 있는 개체 종류를 설명 합니다.
예제
// std_tr1__array__array_const_reverse_iterator.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::const_reverse_iterator it2 = c0.rbegin();
std::cout << " " << *it2;
std::cout << std::endl;
return (0);
}
요구 사항
헤더: <array>
네임 스페이스: std