Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!ccu.umanitoba.ca!herald.usask.ca!alberta!ubc-cs!uw-beaver!milton!unicorn!ogicse!unmvax!ariel.unm.edu!nmsu!opus!newberry From: newberry@nmsu.edu (Jeff Newberry) Newsgroups: comp.lang.c Subject: Re: A question on Function declaration Message-ID: Date: 13 Feb 91 16:27:57 GMT References: <5806@agate.UUCP> Sender: news@NMSU.Edu Organization: Computing Research Lab Lines: 22 In-reply-to: joshi@motcid.UUCP's message of 12 Feb 91 23:44:07 GMT >I would like to declare a function which returns a pointer to a function >(that returns an integer). I have been unable to strike at the correct >syntax of such a declaration. > >I tried the following (among others): > ((int *)()) func() ; > >Doesn't work. > >Thanks for any hints/answers. I believe the following should work... typedef int (*PFI)(); /* type PFI = pointer to a function that returns int */ PFI func(); { ... } Jeff Newberry