1,要对绝对地址0x100000赋值,我们可以用
18 查阅
参考答案:
*((void (*)( ))0x100000 ) ( );
\r\n
首先要将0x100000强制转换成函数指针,即:
(void (*)())0x100000
然后再调用它:
*((void (*)())0x100000)();
用typedef可以看得更直观些:
typedef void(*)() voidFuncPtr;
*((voidFuncPtr)0x100000)();