G
Guest
Hi,
In VC8 project, I am having a struct which is having a char* variable.
Now I am creating a 3 elements array object for the struct. I send the base
address of the object using VARIANT to a function where I am casting to
struct again using reinterpret_cast.
Then If I am trying to traverse the array object from the index 0 to 2, it
is working fine, If I am going for the index 3rd element, that char* variable
addres is having some junk address, so some where it is crashing. That char*
variable address should be NULL pointer or Bad Pointer.
But sometimes if I am going to the index 4th element, char* variable address
is NULL. It is not consistant.
What can we do for that? I can't even initialize the char* variable in that
struct to NULL(0) in VC8.
Thanks,
Vinod.
In VC8 project, I am having a struct which is having a char* variable.
Now I am creating a 3 elements array object for the struct. I send the base
address of the object using VARIANT to a function where I am casting to
struct again using reinterpret_cast.
Then If I am trying to traverse the array object from the index 0 to 2, it
is working fine, If I am going for the index 3rd element, that char* variable
addres is having some junk address, so some where it is crashing. That char*
variable address should be NULL pointer or Bad Pointer.
But sometimes if I am going to the index 4th element, char* variable address
is NULL. It is not consistant.
What can we do for that? I can't even initialize the char* variable in that
struct to NULL(0) in VC8.
Thanks,
Vinod.