Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 13th, 2012  |  syntax: None  |  size: 0.76 KB  |  hits: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. array of function declaration and assignment problem
  2. void (*Event_Handlers)[3]();  //Line no 10
  3.  
  4. /* Queue, Drop and Send_back have been defined. for eg */
  5. void Queue()
  6. {
  7. ....
  8. }
  9.  
  10. Event_Handlers[0]=Queue;  // Line 35
  11. Event_Handlers[1]=Drop;   // Line 36
  12. Event_Handlers[2]=Send_Back;   // Line 37
  13.        
  14. fsm.c:10: error: declaration of âEvent_Handlersâ as array of functions
  15.  
  16.  fsm.c:35: warning: data definition has no type or storage class
  17.  
  18.  fsm.c:35: error: invalid initializer
  19.  
  20.  fsm.c:36: warning: data definition has no type or storage class
  21.  
  22.  fsm.c:36: error: invalid initializer
  23.  
  24.  fsm.c:37: warning: data definition has no type or storage class
  25.  
  26.  fsm.c:37: error: invalid initializer
  27.        
  28. void (*Event_Handlers[3])();
  29.        
  30. typedef void (*func_t)();
  31. func_t EventHandlers[3];