Possible duplicate:
pointer to a specific fixed address
An interesting discussion about this started here, but no one was able to provide a C ++ way:
#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; }
What is the most suitable way to do such a thing in C ++?
c ++ c casting pointers memory
karlphillip
source share