Huh?
Just add it?
Numbers are numbers whether it's hex or decimal. If you want the compiler to see the number as hex just use the 0x prefix, if not just leave it how it is.
Basically right now I have to find the addresses for something I am working on manually each time it updates(which is kinda annoying..) however I have noticed that each address is HEX:+210 from the previous address for example..
#define Address1 (*(short*)( 0x030e5ea0 ) ) // Beginning offset
#define Address2 (*(short*)( 0x030e60b0 ) ) // Address1+HEX:210
#define Address3 (*(short*)( 0x030e62c0 ) ) // Address2+HEX:210
^ The difference in each address is the difference in HEX:+210, so I am wondering how I could do this automatically so I only need to set the first address in an array of offsets like so(pseudo..)
#define Address1 (*(short*)( 0x030e5ea0 ) ) // Beginning offset
#define Address2 (*(short*)( Address1 + h210 ) ) // Address1+HEX:210
#define Address3 (*(short*)( Address2 + h210 ) ) // Address2+HEX:210
You see if I could just figure out how to do the hex addition I could save myself a lot of time and effort but I am a little stumped as to how to accomplish this! I would appreciate any help, and thanks in advance!
Huh?
Just add it?
Numbers are numbers whether it's hex or decimal. If you want the compiler to see the number as hex just use the 0x prefix, if not just leave it how it is.
So to be clear it should look like this? ->
#define Address1 (*(short*)( 0x030e5ea0 ) )
#define Address2 (*(short*)( Address1 + 0x210 ) )
#define Address3 (*(short*)( Address2 + 0x210 ) )
I must be missing something somewhere I think I have the syntax wrong or something.. Are you sure this is how it should be, because this is causing the app to crash now
#define addy 0x030e5ea0
#define Address1 (*(short*)( addy ) )
#define Address2 (*(short*)( addy + 0x210 ) )
#define Address3 (*(short*)( addy + 0x420 ) )
Ah we-a blaze the fyah, make it bun dem!
Yes that's exactly what I needed, I was not defining the base offset correctly!
Thanks a ton guys!
or so:
Code:for(int idx = 0; idx<num; idx++) { adresse[idx] = addy+offset*idx; }
_____________________________________________
READING TUTORIAL:
1. READ MY POST
2. THINK ABOUT MY POST
3. PRESS THANKS
4. MAYBE CORRECT MY POSTS :P
Dijkstra:
"Computer Science is no more about computers than astronomy is about
telescopes."
THANKS BUTTON RIGHT DOWN --->