I want to pass a static member funcion to a function pointer in another class.
To check the passing of the function, we set sysfctinb in B to NULL.
As result, the code compiles, but in assignFunction4B the static member function is not assigned properly.
The sysfctinb function pointer in B stays NULL.
I need to do this with pointers, as I use further classes, whos functions I want to be able to assign to do1();
What am I missing?
Thanks a lot in advance
void assignFunction4B(void(*func)(double*,double*)){
func is a local varable here. Any changes to it will not be reflected in caller.
You can:
1) Pass pointer to pointer and assigne value to dereferenced pointer
2) Pass reference to pointer
3) Do not pass anything, return pointer from function and let caller figure out what to do with it.