Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!sdd.hp.com!elroy.jpl.nasa.gov!ncar!gatech!udel!haven!decuac!shlump.nac.dec.com!engage!ynotme.enet.dec.com!wallace From: wallace@ynotme.enet.dec.com (Ray Wallace) Newsgroups: comp.lang.c Subject: Re: Functions within structures Message-ID: <1990Nov9.184415.12346@engage.enet.dec.com> Date: 9 Nov 90 18:33:53 GMT Sender: news@engage.enet.dec.com (USENET News System) Organization: Digital Equipment Corporation Lines: 16 In article <2203@abcom.ATT.COM>, mdb@abcom.ATT.COM (5013 ) writes... > I need help. I am building a menu using structures and would like > to be able to include the function to be run within the structure. Change your menu structure to have - void (*foo)(); /* Pointer to a function returning void */ Change your function call to - menu[menu_opt].foo(); --- Ray Wallace (INTERNET,UUCP) wallace@oldtmr.enet.dec.com (UUCP) ...!decwrl!oldtmr.enet!wallace (INTERNET) wallace%oldtmr.enet@decwrl.dec.com ---