December 17th, 2012, 09:53 AM
Join Date: Mar 2012
Time spent in forums: 3 h 24 m 32 sec
Reputation Power: 0
Member Function Pointer issues..
I've been trying to get pass a member function as a pointer. I've been here
My code looks like this:
typedef HRESULT (some_class::* some_mfp (long*);
some_mfp derp = HRESULT (some_class::*member_function)(long*);
and my error is:
| error C2143: syntax error : missing ')' before '<tag>::*' |
error C2059: syntax error : ')'
I know it's close, and from the looks of the stack overflow link it should be correct. Please help!
Note: I do realize you're typically not supposed to do this (and it's explicitly mentioned in the C++ faq.) However, sometimes when you're knee-deep in ugly code you have to break out the big guns. Please give me the benefit of the doubt and help me with syntax.