Suppose here I have a structure coding like this:
typedef int (*InputBkPaint)(HWND,pInputStyle,HDC,LPRECT);
typedef struct input_style {
InputBkPaint paintbk;
}InputStyle,*pInputStyle;
Noticed that the defination of a function pointer type
InputBkPaint and following a structure defination which just has a member
paintbk whos data type is a function pointer as above.
Since the defination of the function pointer has a parameter of data type
pInputStyle , Now they are twisted.
If I just complier the code above , there would be a syntax error like undefined identifier.
What I have tried:
If I alter the function pointer defination like this:
typedef int (*InputBkPaint)(HWND,void*,HDC,LPRECT);
, it would be OK with some data type conversion. But that's not what I want.
If I want remain those two typedef without any change, what should I do to make the complier work correctly ?