The subscript operator assumes that the base equals 1. No arithmetic operations are used in any of the member functions. Hence this class is suited as a general vector class for various objects.
Several constructors are available.
The constructor without parameters allocates no memory. Another constructor takes the number of entries in the vector as parameter and allocates memory for the corresponding vector representation. Finally, a copy-constructor is available. Most member functions are self-explanatory. New member functions are described below.