#include "Vector.hpp" Vector::Vector(unsigned int length) { size = length; array = new (nothrow) int[size]; if(array==NULL) { cerr << "Memory allocation failure!" << endl; exit(-1); } for(int i=0; ilength(); array = new (nothrow) int[size]; if(array==NULL) { cerr << "Memory allocation failure!" << endl; exit(-1); } for(int i=0; iarray[i]; } Vector::~Vector() { delete [] array; } unsigned int Vector::length() const { return size; } int& Vector::valueAt(unsigned int pos) { if(pos>=length()) { cerr << "Invalid position!\n"; return array[size-1]; } return array[pos]; } int Vector::find(int a) const { for(int i=0; i