Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!samsung!uakari.primate.wisc.edu!sdd.hp.com!hp-pcd!hpcvia!brianh From: brianh@hpcvia.CV.HP.COM (brian_helterline) Newsgroups: comp.lang.c Subject: Re: A question on Function declaration Message-ID: <31530033@hpcvia.CV.HP.COM> Date: 13 Feb 91 17:13:38 GMT References: <5806@agate.UUCP> Organization: Hewlett-Packard Co., Corvallis, Oregon Lines: 17 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. You need parenthesis around the '*' like this: (int (*)()) func(); ------------------------------------------------------------------------------- Brian Helterline | | brianh@hpcvia.cv.HP.COM Hewlett Packard | empty space here | ..!hp-pcd!hpcvia!brianh Corvallis, OR 97330 | | -------------------------------------------------------------------------------