
Untitled
By: a guest on
Jun 13th, 2012 | syntax:
None | size: 0.76 KB | hits: 20 | expires: Never
array of function declaration and assignment problem
void (*Event_Handlers)[3](); //Line no 10
/* Queue, Drop and Send_back have been defined. for eg */
void Queue()
{
....
}
Event_Handlers[0]=Queue; // Line 35
Event_Handlers[1]=Drop; // Line 36
Event_Handlers[2]=Send_Back; // Line 37
fsm.c:10: error: declaration of âEvent_Handlersâ as array of functions
fsm.c:35: warning: data definition has no type or storage class
fsm.c:35: error: invalid initializer
fsm.c:36: warning: data definition has no type or storage class
fsm.c:36: error: invalid initializer
fsm.c:37: warning: data definition has no type or storage class
fsm.c:37: error: invalid initializer
void (*Event_Handlers[3])();
typedef void (*func_t)();
func_t EventHandlers[3];