简体   繁体   English

更改内存地址值和十六进制数据

[英]Changing memory address values and hex data

So i want to change the value of an address to something else.所以我想将地址的值更改为其他值。 Say if the value of the address is 42859105827 and the address is 0A2BC6FC , How would i change the value of this address?假设地址的值为42859105827且地址为0A2BC6FC ,我将如何更改此地址的值?

Example:例子:

Address    |    Type    |   Value
0A2BC6FC      4 Bytes      42859105827

I think you'll need to reinterpret cast.我认为你需要重新解释演员表。 This probably isn't a super safe way but should work:这可能不是一种超级安全的方法,但应该有效:

size_t address = 0x0A2BC6FC;
int new_value = ...;
reinterpret_cast<int&>(address) = new_value;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM