array::crbegin
Const sterująca zwraca pierwszy element w tablicy odwrócone.
const_reverse_iterator crbegin( ) const;
Wartość zwracana
Const odwrócić sterująca dostępie losowym adresowania pierwszy element w tablicy odwrócone lub adresowania, co zostało ostatni element w tablicy stałe.
Uwagi
Z zwraca wartość z crbegin, nie można zmodyfikować obiektu array.
Przykład
// array_crbegin.cpp
// compile with: /EHsc
#include <array>
#include <iostream>
int main( )
{
using namespace std;
array<int, 2> v1 = {1, 2};
array<int, 2>::iterator v1_Iter;
array<int, 2>::const_reverse_iterator v1_rIter;
v1_Iter = v1.begin( );
cout << "The first element of array is "
<< *v1_Iter << "." << endl;
v1_rIter = v1.crbegin( );
cout << "The first element of the reversed array is "
<< *v1_rIter << "." << endl;
}
Wymagania
Nagłówek:<tablicy>
Przestrzeń nazw: std