home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 242,691 of 243,242   
   Michael Sanders to All   
   function pointer question   
   02 Jan 26 07:24:55   
   
   From: porkchop@invalid.foo   
      
   i have:   
      
   void moo(char HISTORY[][64], int hst_len, int invalid, const char *gme_msg)   
      
   void mastermind(char HISTORY[][64], int hst_len, int invalid, const char   
   *gme_msg)   
      
   to use either i have:   
      
   void (*render)(char [][64], int, int, const char *) = MOO ? moo : mastermind;   
      
   my multi-part question:   
      
   why is void required for the function pointer?   
      
   A: because both moo() & mastermind return void?   
      
   B: because every function must have a return type   
      *including function pointers*?   
      
   C: what about tyedef?   
      
   --   
   :wq   
   Mike Sanders   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca