array::cend
Returns the past-the-end iterator.
const_iterator cend( ) const;
Return Value
The const past-the-end iterator for the array. If the array is empty, array::cend() == array::cbegin().
Remarks
With the return value of array::cend (suitably decremented), the array Class (TR1) object cannot be modified.
Example
// array_cend.cpp
// compile with: /EHsc
#include <array>
#include <iostream>
int main( )
{
using namespace std;
array<int, 2> v1 = {1, 2};
array<int, 2>::const_iterator v1_Iter;
for ( v1_Iter = v1.cbegin( ) ; v1_Iter != v1.cend( ) ; v1_Iter++ )
cout << *v1_Iter << endl;
}
1 2
Requirements
Header: <array>
Namespace: std