checked_array_iterator::operator+=
Adds a specified offset to a checked_array_iterator.
checked_array_iterator<_Iterator>& operator+=(
difference_type _Off
);
Parameters
- _Off
The offset by which to increment the iterator.
Return Value
A reference to the element addressed by the checked_array_iterator.
Remarks
For more information, see Checked Iterators.
Example
// checked_array_iterators_op_plus_eq.cpp
// compile with: /EHsc
#include <vector>
#include <iostream>
int main() {
using namespace stdext;
using namespace std;
int a[] = {6, 3, 77, 199, 222};
int b[5];
copy(a, a + 5, checked_array_iterator<int*>(b,5));
checked_array_iterator<int*> checked_output_iterator(b,5);
cout << *checked_output_iterator << endl;
checked_output_iterator += 3;
cout << *checked_output_iterator << endl;
}
6 199
Requirements
Header: <iterator>
Namespace: stdext