5
// Excruciatingly simple vector-of-pointers class. Easy & useful.
6
// No support for addition of elements anywhere but at the end of the
7
// list, nor for removal of elements. Does not delete (or interpret
8
// in any way) its contents.
15
void set(int i, void* p);
25
inline Vector::Vector()
32
inline int Vector::add(void* p)
40
inline void* Vector::get(int i)
45
inline void Vector::set(int i, void* p)
50
inline int Vector::size()
55
inline void Vector::realloc()
57
_nelem = 2*_nelem + 1;
58
void** array = new void*[_nelem];
59
for(int i=0; i<_sz; i++)