Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!motcid!sland From: sland@motcid.UUCP (Stephen Shortland) Newsgroups: comp.lang.c Subject: Re: A question on Function declaration Keywords: pointer function integer Message-ID: <5807@marble.UUCP> Date: 13 Feb 91 09:36:33 GMT References: <5806@agate.UUCP> Organization: Motorola Inc., Cellular Infrastructure Div., Arlington Heights, IL Lines: 24 joshi@motcid.UUCP (Abhay B. Joshi) writes: >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. Have you tried: int (*func())() I think that this should do what you want. -- | Stephen Shortland, | Motorola Ireland Ltd, | | | | Mahon Industrial Estate, | | | Phone +353-21-357101 | Blackrock, Cork, | ..uunet!motcid!sland | | Fax. +353-21-357635 | IRELAND. | |