checked_iterator::operator->
Returns a pointer to the element addressed by the checked_iterator.
pointer operator->( ) const;
Return Value
A pointer to the element addressed by the checked_iterator.
Remarks
For more information, see Checked Iterators.
Example
// checked_iterator_ptrto.cpp
// compile with: /EHsc
#include <iterator>
#include <algorithm>
#include <vector>
#include <utility>
#include <iostream>
int main() {
using namespace std;
typedef vector<pair<int,int> > pVector;
pVector vec;
vec.push_back(pVector::value_type(1,2));
vec.push_back(pVector::value_type(3,4));
vec.push_back(pVector::value_type(5,6));
stdext::checked_iterator<pVector > pvIter(vec, vec.begin ( ));
stdext::checked_iterator<pVector > pvIterEnd(vec, vec.end ( ));
cout << "The vector vec of integer pairs is:\n( ";
for ( ; pvIter != pvIterEnd; pvIter++)
cout << "( " << pvIter -> first << ", " << pvIter -> second << ") ";
cout << ")" << endl << endl;
}
The vector vec of integer pairs is:
( ( 1, 2) ( 3, 4) ( 5, 6) )
Requirements
Header: <iterator>
Namespace: stdext