Original Post
Can anyone explain please what is the difference between
delete[] ptr
and
delete(ptr)
?
Thanks.
Real programers are not afraid from maths! (but I am)
JJpRiVaTe (Private Zone)
int* lpIntegerArray = new int[10];
delete [] lpIntegerArray;
unsigned long* lpDoubleWord = new unsigned long;
delete lpDoubleWord;
int *ptr_to_int;
int *array_of_int;
ptr_to_int = new int;
array_of_int = new int[40];
delete (ptr_to_int);
delete [] array_of_int;
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more