Hi,
I have a function pointer in a structure like this-
Code:
typedef struct mystruct
{
    int (*fp)(int,int);
}mystruct;
I initialize this func pointer in a function like this-
Code:
void Init(mystruct *handle,int (*my_fp)(int,int))
{
    handle->fp=my_fp;
}
thenI'm trying to use this function pointer in another function, like this-
Code:
int func(mystruct *handle)
{
   int c=handle->fp(1,2);
   return c;
}
Somehow, it is giving me a lot of syntax errors. Please tell me what I'm doing wrong here!