yet another null pointer idea

Andrew Koenig ark at rabbit.UUCP
Wed Mar 14 05:03:08 AEST 1984


How about:

	#define Nullp(t) ((t *) 0)

You can then write:

	char *p;

	...

	if (p == Nullp(char)) {...}

and also:

	foo(Nullp(struct bletch));



More information about the Comp.lang.c mailing list