->

vector class

operator->

int& vect::iterate(){ static int i = 0; i = i % size; return (p[i++]); }

vect

class vect { public: vect(int n = 10); ~vect() { delete []p; } int& element(int i); //access p[i] int ub() const { return (size - 1); } //upper bound private: int* p; int size; } int& vect::element(int i){ assert (i >= 0 && i < size); return p[i]; }

int* vect::operator->() const;