Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!haven!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: Typecast of Pointers to Functions Keywords: pointers, functions, typecast Message-ID: <16598@mimsy.UUCP> Date: 29 Mar 89 00:19:20 GMT References: <7689@killer.Dallas.TX.US> Distribution: usa Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 17 In article <7689@killer.Dallas.TX.US> brian@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@mimsy.umd.edu Path: uunet!mimsy!chris