Search code examples
c++memorymemory-addresscheat-engine

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?

Example:

Address    |    Type    |   Value
0A2BC6FC      4 Bytes      42859105827

Solution

  • 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;