Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 27th, 2012  |  syntax: None  |  size: 0.78 KB  |  hits: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. expected ')' before '*' token with function pointer
  2. typedef struct {
  3.     void (*drawFunc) ( void* );
  4. } glesContext;
  5.  
  6. void glesRegisterDrawFunction(glesContext *glesContext, void(drawFunc*)(glesContext*));
  7.        
  8. void glesRegisterDrawFunction(glesContext *cntxt, void(*drawFunc)(glesContext*));
  9.                                                        ^^^^^^^^^
  10.                                                        note here
  11.        
  12. typedef struct {
  13.     void (*drawFunc) ( void* );
  14. } glesContext;
  15.  
  16. // define a pointer to function typedef
  17. typedef void (*DRAW_FUNC)(glesContext*);
  18.  
  19. // now use this typedef to create the function declaration
  20. void glesRegisterDrawFunction(glesContext *glesContext, DRAW_FUNC func);
  21.        
  22. void glesRegisterDrawFunction(glesContext *glesContext, void (*drawFunc)(glesContext*));