Typecast of Pointers to Functions
Chris Torek
chris at mimsy.UUCP
Wed Mar 29 10:19:20 AEST 1989
In article <7689 at killer.Dallas.TX.US> brian at killer.Dallas.TX.US
(Brian Pellerin) writes:
>I am looking for an equivalent way to specify a typecast of a pointer to
>a function other than using typedef. For Example:
>
> int (*fcn_ptr2) ();
>
> fcn_ptr2 = (???????) NULL; /* Do Not Use the typedef. What Goes Here? */
The cast is not strictly necessary here, but its form is
fcn_ptr2 = (int (*)()) NULL;
See any half-decent C book for the derivation.
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain: chris at mimsy.umd.edu Path: uunet!mimsy!chris
More information about the Comp.lang.c
mailing list