#include #include #include "array_iterator.h" using namespace std; int a[] = {10, 20, 30}; const size_t n = sizeof a / sizeof a[0]; inline array_iterator begin() {static const array_iterator it(a); return it;} inline array_iterator end() {static const array_iterator it(a+n); return it;} int main() { for (array_iterator it = begin(); it != end(); ++it) { cout << *it << "\n"; //cout << it.operator*() << "\n"; } return EXIT_SUCCESS; }