Explicit cast of NULL (was Re: Shor

rgh at inmet.inmet.com rgh at inmet.inmet.com
Fri Jul 6 01:46:00 AEST 1990


You can have typed null pointers without having to declare a macro
for each one:

#define NIL(type) ((type)0)

It's a matter of taste whether 

    NIL(char *)

looks better than

    ((char*)0)


Randy Hudson   rgh at inmet.inmet.com



More information about the Comp.lang.c mailing list