title: How do game trainers change an address in memory that's dynamic?
body: <p>Lets assume I am a game and I have a global <code>int*</code> that contains my health. A game trainer's job is to modify this value to whatever in order to achieve god mode. I've looked up tutorials on game trainers to understand how they work, and the general idea is to use a memory scanner to try and find the address of a certain value. Then modify this address by injecting a dll or whatever.</p>
  
  <p>But I made a simple program with a global <code>int*</code> and its address changes every time I run the app, so I don't get how game trainers can hard code these addresses? Or is my example wrong?</p>
  
  <p>What am I missing?</p>