How would you write a Vector template class that checks the indexes passed to the [] operator to make sure they are correct....
Inheritance??
I have this so far
Code:template <class T> class Vector { public: Vector(); Vector(int size_t n); ~Vector(); std::vector<int> array; try{ array.at(1000) = 0; } catch(std::out_of_range o){ std::cout<<o.what()<<std::endl; }