想象一下,我正在做这样的事情:
void *p = malloc (1000);
*((char*)p) = some_opcode;
*((char*)p+1) = another_opcode; // for the sake of the example: the opcodes are ok
....
etc...
Run Code Online (Sandbox Code Playgroud)
如何定义一个函数指针来调用p,好像它是一个函数?(我使用的是VC++ 2008 express).
谢谢