"void **" : Is it valid and what does it mean?

Doug Gwyn gwyn at smoke.brl.mil
Wed May 29 17:27:39 AEST 1991


By the way, there is no need to go through a lot of gyrations to attain
the originally-stated goal.  Just declare the parameter as a void * anyway,
and apply the appropriate cast inside the function where it is used.  E.g.
	void foo(void *param) { ++(*(struct msg **)param)->field; }
After all, the thing pointed to, in this case a "struct msg *", is also an
object and so a pointer to it (a "struct msg **") can be fairly
conveniently converted to void* and back.



More information about the Comp.lang.c mailing list