TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Darin McBride
from: Neil Heller
date: 2004-04-19 11:57:00
subject: Function Pointers

DM> So then you may have a struct like this:

DM>struct Database {
DM>  HDLL hdll; /* can't remember the exact type ;-> */
DM>  error_t (*GetEmployee)(struct EmpRecord* r);
DM>  error_t (*SaveEmployee)(struct EmpRecord* r);
DM>};

That brings up another point.  How do you create a function pointer that 
returns something other than that which was passed-in?  For example, if 
GetEmployee() above were to return a pointer to double and 
SaveEmployee() were to return a pointer to a structure of type struct 
foo?

þ CMPQwk 1.42 999

--- Maximus/2 3.01
* Origin: COMM Port OS/2 juge.com 204.89.247.1 (281) 980-9671 (1:106/2000)
SEEN-BY: 633/267 270
@PATH: 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.