### Question 4.9

Can I use a `void **` pointer to pass a generic pointer to a function by reference?

Not portably. There is no generic pointer-to-pointer type in C. `void *` acts as a generic pointer only because conversions are applied automatically when other pointer types are assigned to and from `void *`'s; these conversions cannot be performed (the correct underlying pointer type is not known) if an attempt is made to indirect upon a `void **` value which points at something other than a `void *`.

Read sequentially: prev next up top

This page by Steve Summit // Copyright 1995 // mail feedback