
Untitled
By: a guest on
Apr 27th, 2012 | syntax:
None | size: 0.78 KB | hits: 20 | expires: Never
expected ')' before '*' token with function pointer
typedef struct {
void (*drawFunc) ( void* );
} glesContext;
void glesRegisterDrawFunction(glesContext *glesContext, void(drawFunc*)(glesContext*));
void glesRegisterDrawFunction(glesContext *cntxt, void(*drawFunc)(glesContext*));
^^^^^^^^^
note here
typedef struct {
void (*drawFunc) ( void* );
} glesContext;
// define a pointer to function typedef
typedef void (*DRAW_FUNC)(glesContext*);
// now use this typedef to create the function declaration
void glesRegisterDrawFunction(glesContext *glesContext, DRAW_FUNC func);
void glesRegisterDrawFunction(glesContext *glesContext, void (*drawFunc)(glesContext*));