Simple implementation of the vector class in C++