Functions within structures
Ray Wallace
wallace at ynotme.enet.dec.com
Sat Nov 10 05:33:53 AEST 1990
In article <2203 at abcom.ATT.COM>, mdb at 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 at oldtmr.enet.dec.com
(UUCP) ...!decwrl!oldtmr.enet!wallace
(INTERNET) wallace%oldtmr.enet at decwrl.dec.com
---
More information about the Comp.lang.c
mailing list