the number of elements is placed in a DWORD 4 bytes before the returned pointer...
so if you would do this..
then this is true:Code:DWORD * array = new DWORD[5];
this way it is know to the compiler how many elements are in the array, used only for the constructors and even more the destructors...Code:array[-1] == 5
note: this is not completely true.. see discussion below.




Reply With Quote
