Aracılığıyla paylaş


array::rend

Tersine çevrilen kontrollü sıranın sonuna atar.

reverse_iterator rend();
const_reverse_iterator rend() const;

Notlar

Üye işlevler ters bir yineleyici bu noktalarda ilk öğe sırası (veya yalnızca boş bir sıra ötesinde) döndürür).Bu yüzden, ters bitişinde atar.

Örnek

 

// std_tr1__array__array_rend.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 first element " 0" 
    Myarray::const_reverse_iterator it2 = c0.rend(); 
    std::cout << " " << *--it2; 
    std::cout << std::endl; 
 
    return (0); 
    } 
 
  

Gereksinimler

Başlık: <array>

Namespace: std

Ayrıca bkz.

Başvuru

<array>

array Class (TR1)

array::begin

array::end

array::rbegin