1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
// array::rbegin/rend
#include <iostream>
#include <array>
int main ()
{
std::array<int,4> myarray = {4, 26, 80, 14} ;
std::cout << "myarray contains:";
for ( auto rit=myarray.rbegin() ; rit < myarray.rend(); ++rit )
std::cout << ' ' << *rit;
std::cout << '\n';
return 0;
}
|