Advertisement
obernardovieira

Access to Memory Address

Aug 24th, 2013
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. memcpy (txt, (char*)(0x02804C20), sizeof(txt));
  2.  
  3. //ou
  4.  
  5. volatile char * p = (char *)0x12345678; // p is pointer to byte address 0x12345678
  6. char b = *p; // read byte from address 0x12345678
  7.  
  8. //ou
  9.  
  10. #include <cstdint>
  11.  
  12. uintptr_t p = 0x0001FBDC;
  13. int value = *reinterpret_cast<int *>(p);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement