Hi,
If I'm not mistaken, the following code will allocate 5 integer elements from memory to 'ptr':
int *ptr;
ptr = new int[5];
If after this code I enter the following:
ptr = new int[7];
will the original 5 elements be overwritten or deallocated? Or will they just stay resident in memory for nothing?
Thanks,
Dean