The following data structure is obtained:
typedef struct
{
lamp *lamp;
unsigned char a;
unsigned char b;
unsigned char c;
unsigned char d;
unsigned char e;
void (*func)(struct event *);
} event;
The last line inside the structure should be a pointer to a function with a return type of void with a pointer to the event as an argument, for example:
void function(event *evt);
Although, I get the following warning message: "its scope is just that definition or declaration, which is probably not what you want." Is this right or wrong?
source
share