Returning a pointer to a function

Tom Armistead ta at swsrv1.uucp
Tue Mar 26 06:54:33 AEST 1991


In article <1991Mar25.094620.70 at skyler.mavd.honeywell.com> magnuson at skyler.mavd.honeywell.com (Randy Magnuson - Honeywell Inc.) writes:
>I am writing an application that needs a function that returns a pointer to a
>function (which returns an int).  Can anyone send me an example of how to
>declare such a function?

There is a program called cdecl in the Unix archives that you need to get. It
will take an english description of what you want and give you a C declaration
or vice-versa.

Ex.
   cdecl> declare func as function returning pointer to function returning int
   cdecl> int (*func())()

Where the 1st line is what you type in and the second is cdecl's response...

The stuff is in Volume14: cdecl2.1.Z and cdecl2.2.Z

Tom
-- 
Tom Armistead - Software Services - 2918 Dukeswood Dr. - Garland, Tx  75040
===========================================================================
{void,egsner}!swsrv1!toma                           mic!ozdaltx!swsrv1!toma
{uunet,smu,ames}!sulaco!ozdaltx!swsrv1!toma



More information about the Comp.lang.c mailing list