C
conrad
What purpose does qualifying
a pointer to void with const
really serve? Before you can use what
the pointer points to, you must cast
it to the appropriate pointer type.
Then, you may as well include the
const qualification in the case. Being that
the const qualification serves no point
upon casting the pointer to void to some
other pointer type.
For example, take a look at 'free'.
Why is the parameter type 'const void *'?
What purpose is it really serving?
a pointer to void with const
really serve? Before you can use what
the pointer points to, you must cast
it to the appropriate pointer type.
Then, you may as well include the
const qualification in the case. Being that
the const qualification serves no point
upon casting the pointer to void to some
other pointer type.
For example, take a look at 'free'.
Why is the parameter type 'const void *'?
What purpose is it really serving?