/** * Definition of a Vector of integers */ class Vector { // ============================================== // data members // ============================================== protected: // maximum number of elements int max_elements; // storage for the elements allocated dynamically int *elements; // ============================================== // methods // ============================================== public: /** * constructor with initial size in number of elements * @param me maximum number of elements */ Vector(int me) { max_elements = me; elements = new int [ max_elements ]; } /** * destructor */ virtual ~Vector() { delete [] elements; } };