checked_array_iterator::operator
Vrátí odkaz na posun prvku z prvku odkazovaného checked_array_iterator o určený počet pozic.
reference operator[](
difference_type_Off
) const;
Parametry
- _Off
Posun od checked_array_iterator adresa.
Vrácená hodnota
Odkaz na prvek posun.
Poznámky
Další informace naleznete v tématu Checked – iterátory.
Příklad
// checked_array_iterators_op_diff.cpp
// compile with: /EHsc
#include <vector>
#include <iostream>
int main() {
using namespace std;
int V1[10];
for (int i = 0; i < 10 ; i++)
V1[i] = i;
// Declare a difference type for a parameter
stdext::checked_array_iterator<int*>::difference_type diff = 2;
stdext::checked_array_iterator<int*> VChkIter(V1, 10);
stdext::checked_array_iterator<int*>::reference refrpos = VChkIter [diff];
cout << refrpos + 1 << endl;
}
3
Požadavky
Hlavička: <iterátor>
Obor názvů: stdext