R
rihad
Hi, I've this question: suppose we have two differently typed pointers:
struct foo *foo;
char **array;
Becase one can always legally cast any pointer to (void *), and becase (void *)
is assignable to any pointer type, is it ever necessary to cast when assigning
one pointer type to another? I.e. since
foo = (void *) array;
is legal (or is it?), isn't the (void *) there just line noise?
TIA
struct foo *foo;
char **array;
Becase one can always legally cast any pointer to (void *), and becase (void *)
is assignable to any pointer type, is it ever necessary to cast when assigning
one pointer type to another? I.e. since
foo = (void *) array;
is legal (or is it?), isn't the (void *) there just line noise?
TIA