home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_09_12 / 9n12114c < prev    next >
Text File  |  1991-10-21  |  483b  |  28 lines

  1. /* LISTING 6 - OBJ.C */
  2.  
  3. #include <stdio.h>
  4. #include "obj.h"
  5.  
  6. /* action pack is external */
  7. extern CIRCLE_ACTIONS cact;   
  8.  
  9.  
  10.  
  11. main()
  12.    {
  13.    int col;
  14.    
  15.    /* set color value and actions */
  16.    CIRCLE c1 = { 14, &cact };
  17.  
  18.    col = (*c1.pcact[GETCOLOR])(&c1);
  19.    printf("c1 is color %d\n", col);
  20.  
  21.    /* try to get direct access to c1's
  22.           color function */
  23.    /* cgetcolor(&c1); 
  24.        linker error:  cgetcolor :
  25.        unresolved external */
  26.    }
  27.  
  28.