I have:
int *ptr = new int[8];
delete[] ptr; // it ok, all ptr is delete;
but if I have:
int *ptr = new int[8];
ptr++;
delete[] ptr;
My question:
Does delete[] delete all ptr from ptr[0] to ptr[7] or just from ptr[1] to ptr[7]?
And, if it deletes from ptr[1] to ptr[7], how does delete[] know the real size to delete this time?