I am trying to create a function in VC++ that takes a function pointer but I keep getting syntax errors.
The declaration in my header file looks like this:
void ApplyFuncToCellsInSelection(void(*func)(CPoint, *CSpreadWnd));
Here is the definition:
void CSpreadWnd::ApplyFuncToCellsInSelection(void(*func)(CPoint, *CSpreadWnd)) { ... }
And here are the error messages I'm getting:
c:\...\spreadwnd.h(274) : error C2059: syntax error : 'function-style cast'
c:\...\spreadwnd.h(274) : error C2059: syntax error : ')'
c:\...\spreadwnd.h(274) : error C2143: syntax error : missing ')' before ';'
I know its probably something really simple that I'm missing but I can't seem to figure it out.