
The FPointer address is never the same as the actual function address which seems odd to me.
Yet when I do:
std::cout << (*FPointer)(4, 4);I get the expected result.
Can anyone explain why this happens?

std::cout << (*FPointer)(4, 4);
int (*fp) (int,int) = Test;004282AE mov dword ptr [fp],offset Test (426096h) fp(5,6);004282B5 mov esi,esp 004282B7 push 6 004282B9 push 5 004282BB call dword ptr [fp] Test:00426096 jmp Test (428260h) fp(5,6);00401010 push 6 00401012 push 5 00401014 call Test (401000h) 00401019 add esp,8
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more