I have a weird problem with my function pointer
This won't workCode:void (*test)(void)=0; void SetPointer(int pointer) { test=pointer; }
I recieve this:
'=' : cannot convert from 'int' to 'void (__cdecl *)(void)'
I have a weird problem with my function pointer
This won't workCode:void (*test)(void)=0; void SetPointer(int pointer) { test=pointer; }
I recieve this:
'=' : cannot convert from 'int' to 'void (__cdecl *)(void)'
Use
Code:void SetPointer(void (*ptr)()) { test = ptr; }
It works! thx.