home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_09_12
/
9n12110a
< prev
next >
Wrap
Text File
|
1991-10-16
|
519b
|
18 lines
/* getcolor "member" function */
int circle_getcolor(CIRCLE *pc) { return pc->color; }
/* setcolor member function */
int circle_setcolor (CIRCLE *pc, int val); { return (pc->color
= val); }
/* define and initialize the action package */
CIRCLE_ACTIONS caction = { circle_getcolor, circle_setcolor
};
/* define CIRCLE c and hook it to the action pack */
CIRCLE c = { 10, 10, 5, 4, /* set x, y, radius and color
*/
&caction; /* set paction pointer in c to point to the
action package */
};