I want to point a function directly to an address in my program But whenever I write this,
void (*foo)(int)= 0x00510102;
I always get an error in VC++ 2010 saying that a value of type int cannot be used to initialize an entity of type "void(*)(int)"
What am I doing wrong. I have tried many things but I just cant simply get the function pointer to point to 0x00510102 address.