W
William Payne
Hello!
If a cast from a void pointer to a pointer to a struct fails at runtime, is
NULL the result? I.E, is this code meaningful:
struct my_struct_t foo* = (struct my_struct_t*)void_pointer;
// void_pointer is of type void*
if(foo == NULL)
{
printf("Error!\n");
}
/ William Payne
If a cast from a void pointer to a pointer to a struct fails at runtime, is
NULL the result? I.E, is this code meaningful:
struct my_struct_t foo* = (struct my_struct_t*)void_pointer;
// void_pointer is of type void*
if(foo == NULL)
{
printf("Error!\n");
}
/ William Payne