S
Simon
Hi,
if I have an array, any array, why can I not get it's size?
for example
unsigned char *szTest = new unsigned char[10];
....
how can I get it's size?
I mean if memory for it is allocated then I should be able to get its size?
By size I mean the number of items in the array.
so in the example above
int nSize = sizeofarray(szTest); // = 10;
or even get the total allocated size
int nSize = arraysize(szTest)/sizeof(szTest[0])); // = 10;
regards.
Simon
if I have an array, any array, why can I not get it's size?
for example
unsigned char *szTest = new unsigned char[10];
....
how can I get it's size?
I mean if memory for it is allocated then I should be able to get its size?
By size I mean the number of items in the array.
so in the example above
int nSize = sizeofarray(szTest); // = 10;
or even get the total allocated size
int nSize = arraysize(szTest)/sizeof(szTest[0])); // = 10;
regards.
Simon