J
Jo Siffert
Hi,
I have an array like
Foo **ppArr = new Foo*[ size ];
I would like to check if the array holds a pointer to an object at a
certain index using something like
if ( ppArr[ idx ] == NULL ) { ... }
However, this statement always evaluates to false, as ppArr[ idx ]
always has a value of 0xcdcdcdcd instead of NULL (using VC++ 7).
Do I have to set all fields explicitly to NULL (using something like
UNIX's bzero()) to get this to work?
Thanks,
Jo
I have an array like
Foo **ppArr = new Foo*[ size ];
I would like to check if the array holds a pointer to an object at a
certain index using something like
if ( ppArr[ idx ] == NULL ) { ... }
However, this statement always evaluates to false, as ppArr[ idx ]
always has a value of 0xcdcdcdcd instead of NULL (using VC++ 7).
Do I have to set all fields explicitly to NULL (using something like
UNIX's bzero()) to get this to work?
Thanks,
Jo