关于这个问题的有趣讨论可以在这里找到,但是至今没有人能提供C++的解决方法:
#include <stdio.h>
int main(void)
{
int* address = (int *)0x604769;
printf("Memory address is: 0x%p\n", address);
*address = 0xdead;
printf("Content of the address is: 0x%p\n", *address);
return 0;
}
在C++中最合适的做法是什么?