From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: calling foo(void (*func)(__dpmi_regs *)).... Date: Tue, 18 Nov 1997 09:09:52 -0800 Organization: Alcyone Systems Lines: 33 Message-ID: <3471CBE0.72E4A13@alcyone.com> References: <19971118004901 DOT TAA11968 AT ladder01 DOT news DOT aol DOT com> <34714fe2 DOT 992331 AT news DOT uni-duisburg DOT de> NNTP-Posting-Host: newton.alcyone.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Michael Mauch wrote: > > Okay, i got this code out of a mouse vector (or whatever you call > > that 0x33 > > thing) example in DJGPP's faq. I copied in the code, looked up all > > the > > functions (i like to know what i'm doing), and tried calling it > > like: > > > > foo(theVector()); > > What's foo, what's theVector()? "That 0x33 thing" is not very helpful > for guessing what you're trying to do. I'm not specifically familiar with what the original poster is trying to do, but it looks like he's trying to call a function (`foo') with a function _pointer_ (`theVector') as its argument. In this case, the statement he wrote above is not correct -- he is _invoking_ `theVector' (which presumably takes arguments and thus is giving an error). What he meant is this: fo(theVector); The name of a function decays to a pointer to it, which is what the original poster was looking for. -- Erik Max Francis, &tSftDotIotE / mailto:max AT alcyone DOT com Alcyone Systems / http://www.alcyone.com/max/ San Jose, California, United States / icbm://+37.20.07/-121.53.38 \ "Since when can wounded eyes see / If we weren't who we were" / Joi