error: expected primary-expression before ')' when passing
function-pointer to a function
Following is the function that takes function prototype as an argument:
void callAdded(void (*unitAdded)(rates));
When I do:
callAdded((&ConverterProxy::unitAdded)(rates));
ConverterProxy::unitAdded is a static function and rates is a struct.
Why do I get that error?
No comments:
Post a Comment