#ifndef _INTARRAYLIST_H #define _INTARRAYLIST_H class IntArrayList { public: IntArrayList(); IntArrayList(const int * const arr, size_t len); IntArrayList(const IntArrayList &rhs); ~IntArrayList(); size_t len() const { return len_ }; IntArrayList& operator=(const IntArrayList &rhs); int& operator[](size_t n); // int& enables assignment IntArrayList& operator+=(int val); // Could be operator abuse friend std::ostream& operator<<(std::ostream& ostr, const IntArrayList &rhs); private: int *array_; size_t len_; size_t maxsize_; }; #endif // _INTARRAYLIST_H