Y
yancheng.cheok
hello, may i know how i can determine whether a pointer is pointing to
an array or a single item during runtime?
this is because in certain situation, i need to determine whether to
use delete or delete[] to deallocate the item(s) ponting by the
pointer.
also, is there any way to determine whether the allocated memory
pointed by the pointer is allocated through new or c version calloc/
malloc?
thank you.
an array or a single item during runtime?
this is because in certain situation, i need to determine whether to
use delete or delete[] to deallocate the item(s) ponting by the
pointer.
also, is there any way to determine whether the allocated memory
pointed by the pointer is allocated through new or c version calloc/
malloc?
thank you.