#ifndef ARRAY_ITERATORH #define ARRAY_ITERATORH class array_iterator { int *p; public: array_iterator(int *initial_p): p(initial_p) {} int& operator*() const {return *p;} array_iterator& operator++() {++p; return *this;} friend bool operator!=(const array_iterator& it1, const array_iterator& it2) { return it1.p != it2.p; } }; #endif