首页 > 编程语言 > 详细

[C++] Memory Retrieval(内存检索)

时间:2015-10-14 23:38:51      阅读:238      评论:0      收藏:0      [点我收藏+]

Traverse the memory by  (char*) , because every time it will increase by 1byte

when i want get the int value , i need convert (char*) to (int*) , after that ,

it will get the value from continuous 4 bytes .

 

void *p = (void*)0x00C5FBF8;
void *q = (void*)0x00C5FFFF;

for (char* c = (char*)p; c != q ; c++)
{
  int k = *((int*)c);
  printf("%d\n", k);
}

技术分享

[C++] Memory Retrieval(内存检索)

原文:http://www.cnblogs.com/tianhangzhang/p/4879021.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!