home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!olivea!charnel!rat!koko.csustan.edu!deneb.csustan.edu!pendell
- From: pendell@deneb.csustan.edu (Brian Pendell)
- Newsgroups: comp.lang.c
- Subject: pointers to functions
- Summary: How do I call a function pointed to by a pointer?
- Keywords: pointers functions parameters
- Message-ID: <1992Nov6.234729.13866@koko.csustan.edu>
- Date: 6 Nov 92 23:47:29 GMT
- References: <1dej8fINNq9i@agate.berkeley.edu> <mwm.2k0j@contessa.palo-alto.ca.us>
- Sender: pendell@ceti.csustan.edu (Brian Pendell)
- Distribution: na
- Organization: CSU Stanislaus
- Lines: 20
-
- Greetings!
-
- As many of you already know, the declaration
-
- double (*pfun) ();
-
- declares pfun to be a pointer to a function which returns double.
-
- Now, how do I call the function using the pointer? That is, the next
-
- instruction should be:
-
- "Call the function pointed to by pfun with parameters A and B"
-
- function (A,B), in other words.
-
- Any suggestion?
-
-
- -- Brian Pendell (pendell@ceti.csustan.edu)
-