Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!nuchat!moray!urchin!p6.f506.n106.z1.fidonet.org!Bob.Stout From: Bob.Stout@p6.f506.n106.z1.fidonet.org (Bob Stout) Newsgroups: comp.lang.c Subject: function pointer help needed (again) Message-ID: <17395.24C67648@urchin.fidonet.org> Date: 20 Jul 89 07:30:49 GMT Sender: ufgate@urchin.fidonet.org (newsout1.26) Organization: FidoNet node 1:106/506.6 - Fulcrum's Edge, Spring TX Lines: 20 In an article of <18 Jul 89 01:19:58 GMT>, (Bob Calbridge) writes: >Here's the problem. I'm attempting to use the windowing functions of a >library called CXL to design a utility program. Excellent choice... >Now, here's a piece from my program: > >wmenubeg (27,9,53,20,5,0,_BLUE|WHITE,NULL); > wmenuitem (1,2,"Build a configuration",'B',1,0,build_config(),0,0); > ... Assuming that build_config() and your other functions are properly declared and/or prototyped, this is almost right. Leave off the "()" when including the function in the call to wmenuitem(). The way you have this written, what's being passed to wmenuitem() is the return value from calling build_config() with no arguments. Simply sayding (...,build_config,...) will put the address of the build_config() function into the parameter list for wmsnuitem() - but only, as I mentioned, if it's been previously declared.