I have a weird problem with my function pointer
This won't work :(Code:void (*test)(void)=0;
void SetPointer(int pointer)
{
test=pointer;
}
I recieve this:
'=' : cannot convert from 'int' to 'void (__cdecl *)(void)'
Printable View
I have a weird problem with my function pointer
This won't work :(Code: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.