home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / c / 16107 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  986 b 

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!olivea!charnel!rat!koko.csustan.edu!deneb.csustan.edu!pendell
  2. From: pendell@deneb.csustan.edu (Brian Pendell)
  3. Newsgroups: comp.lang.c
  4. Subject: pointers to functions
  5. Summary: How do I call a function pointed to by a pointer?
  6. Keywords: pointers functions parameters
  7. Message-ID: <1992Nov6.234729.13866@koko.csustan.edu>
  8. Date: 6 Nov 92 23:47:29 GMT
  9. References: <1dej8fINNq9i@agate.berkeley.edu> <mwm.2k0j@contessa.palo-alto.ca.us>
  10. Sender: pendell@ceti.csustan.edu (Brian Pendell)
  11. Distribution: na
  12. Organization: CSU Stanislaus
  13. Lines: 20
  14.  
  15. Greetings!
  16.  
  17. As many of you already know, the declaration
  18.  
  19. double (*pfun) ();
  20.  
  21. declares pfun to be a pointer to a function which returns double.
  22.  
  23. Now, how do I call the function using the pointer? That is, the next
  24.  
  25. instruction should be:
  26.  
  27. "Call the function pointed to by pfun with parameters A and B"
  28.  
  29. function (A,B), in other words.
  30.  
  31. Any suggestion?
  32.  
  33.  
  34.     -- Brian Pendell (pendell@ceti.csustan.edu)
  35.