Code Fragment: Vect



class Vect {
private:
  int*		theVect;		// the array holding the vector
  int		vectSize;		// size of the vector
public:
  Vect(int size = 10) {			// constructor, given size
    vectSize = size;
    theVect = new int[size];		// allocate the array
  }
  // ...				(other functions omitted)
  ~Vect()				// destructor
    { delete [] theVect; }		// free the allocated array
};