In absolute terms, Why would you do this?
Encoder1 knows itself, you would not need to pass that as a parameter
And to be more specific, the way you wrote it, the compiler tries to call IncrementStoredVariable
with Encoder1
as parameter and pass the outcome of this function call to SetCallbackRight
…. Of course this matches nothing at all…
if you really wanted to pass a parameter when you set the callback, you would write something like this
Encoder1.SetCallbackRight(IncrementStoredVariable, someParameter);
That is the SetCallbackRight function would have to expect two parameters
Side note:
This is not how you tell the parameter is a function pointer
It’s always easier to read when you define a type for your function pointer
typedef void (*t_callback)(void); // type for conciseness
…
void SetCallbackLeft(t_callback FuncPtr);