I'm a beginner at this and I'm following tutorials but I am kind of stuck.
I found a function that accesses all characters X position in game. I found this using Cheat Engine and here's how it looks:
All these addresses are X positions of characters in game.
I looked up this function in IDA and the functions looks like this:
double __thiscall sub_427380(int this) { return *(float *)(this + 80); } So I managed to hook this function and read the values in C++.
Here's the code:
double hookedFunction(int i) { float f = *(float *)(i + 80); return originalFunction(i); } This works but when I try to read values from other offsets that I found using the "Dissect Data/Structures" function in Cheat Engine I'm stuck.
Here's the structure from one of the addresses I found in Cheat Engine:

When I subtract 80 from the address and I create a new data structure in Cheat Engine it looks like this: 
So here's where I need help. How do I read the string at offset 0040 and the 4 bytes at offset 003C in my hooked function.
I tried doing stuff like:
DWORD d = *(DWORD *)(i + 0x3C); But whatever I try I can't get the right values.