hmm how about that code for expanding the dynamic array:
Code:
//save old values
T tArr[aSize];
for(int i=0; i<aSize; i++)
     tArr[i] = nArr[i];

delete[] nArr;

//create new array
nArr = new T[aSize+1];
for(int i=0; i<aSize; i++)
     nArr[i] = tArr[i];
nArr[aSize] = nVal;
aSize++;
is there a memory leaking here too?