hi, i want to read memory at adress 02804C20 and get its value, this should be simple but i'm a little new at this ^^
it should be something like
char txt[512];
txt = value.from.memory.at(02804C20);
Printable View
hi, i want to read memory at adress 02804C20 and get its value, this should be simple but i'm a little new at this ^^
it should be something like
char txt[512];
txt = value.from.memory.at(02804C20);
Why do you want to read something from a static memory address ?Code:memcpy (txt, (char*)(02804C20), sizeof(txt));
i thougt i'd need a pointer at first too, but address was fully static
Memory addresses change every time you run your program... that's why I asked.Quote:
i thougt i'd need a pointer at first too, but address was fully static
oops.. my bad...
Code:memcpy (txt, (char*)(0x02804C20), sizeof(txt));
thx) works
btw sizeof(text) returns real size of text or its maxsize? or maxsize was maxsizeof(txt) ?
sizeof(txt) is 512. It returns 512 * sizeof(char).Code:char txt[512];
plus, how do i get value from 4 bytes address into an int ?
ps-how do i get the real size? like if char = '12345" so it'd be 5 or 6
strlenQuote:
like if char = '12345" so it'd be 5 or 6
thx, but what about int value? i have an adress 4 bytes which has a number, i need this number to count thingsQuote:
strlen
Unless you're working with very specialized hardware, there's almost no reason ever to hard-code a particular address.
If you have a pointer, you can just dereference it (assuming you know what kind of data it is pointing at). I think you're missing some simple C++ concept here (or you're trying to cheat at the game).