> NULL has the same bit pattern as the number zero. (I'm not saying the bit
> pattern is all zeroes. And I am not even sure if NULL ought to
> have the same
> pattern as zero.) So C++ could use (void *)0, if it would let itself :p
They don't have to have the same bit pattern. There's no logical reason a
NULL pointer couldn't have all bits set and the number zero have all bits
cleared.
Casts are perrmited to change the bit pattern. For example '(float) 7' can
result in a different bit pattern than '7' and similarly '(void *) 0' can
result in a different bit pattern from '0'.
As a trivial example, consider an LP64 system. NULL will have the bit
pattern of 64 zero bits, while '0' will have the bit pattern of 32 zero
bits.
DS