checked_array_iterator::operator*

Zwraca element, który checked_array_iterator adresy.

reference operator*( ) const;

Wartość zwracana

Wartość elementu kierowane przez checked_array_iterator.

Uwagi

Aby uzyskać dodatkowe informacje, zobacz Zaznaczone iteratory.

Przykład

// checked_array_iterator_pointer.cpp
// compile with: /EHsc
#include <iterator>
#include <algorithm>
#include <vector>
#include <utility>
#include <iostream>

using namespace std;
using namespace stdext;

int main() {
   int a[] = {0, 1, 2, 3, 4};
   int b[5];
   pair<int, int> c[1];
   copy(a, a + 5, checked_array_iterator<int*>(b,5));

   for (int i = 0 ; i < 5 ; i++)
      cout << b[i] << endl;

    c[0].first = 10;
    c[0].second = 20;
    
   checked_array_iterator<int*> checked_output_iterator(b,5);
   checked_array_iterator<int*>::pointer p = &(*checked_output_iterator);
   checked_array_iterator<pair<int, int>*> chk_c(c, 1);
   checked_array_iterator<pair<int, int>*>::pointer p_c = &(*chk_c);
   
   cout << "b[0] = " << *p << endl;
   cout << "c[0].first = " << p_c->first << endl;
}
  

Wymagania

Nagłówek: <iterator>

Przestrzeń nazw: stdext

Zobacz też

Informacje

checked_array_iterator — Klasa

Standardowa biblioteka szablonów