Aug 16, 2016 at 9:32pm UTC
I need help i wont to try something like this
1 2 3
int a = 5;
string hex = a << hex;
Last edited on Aug 16, 2016 at 10:36pm UTC
Aug 16, 2016 at 10:23pm UTC
Yes but i wont to do this
1 2 3 4 5 6 7
int a = 5;
address = a in hexidecimal ?
ReadProcessMemory(hProc, address, &nVal, (DWORD)sizeof (nVal), NULL);
cout << nVal << endl;
Last edited on Aug 16, 2016 at 10:36pm UTC
Aug 16, 2016 at 10:26pm UTC
A number's value does not change when it is represented using a different base.
Edit: please use code tags.
Last edited on Aug 16, 2016 at 10:27pm UTC
Aug 16, 2016 at 10:28pm UTC
yes but how to int addres = a in hexidecimal ?
Last edited on Aug 16, 2016 at 10:35pm UTC
Aug 16, 2016 at 10:30pm UTC
1 2 3 4 5 6 7 8 9 10 11 12
for (NOS;NOS <= trazido;NOS+=4)
{
ofstream provera("SveProvereneAdrese\\ML1.txt" );
provera << hex << NOS << endl;
provera.close();
fstream MemoryAddress("SveProvereneAdrese\\ML1.txt" );
LPVOID linee;
MemoryAddress >> linee;
cout << linee << endl;
ReadValue(linee,app.c_str());
MemoryAddress.close();
}
here is my code
do you see i use ofstream and fstream to convert int nos value in hexedecimal
Last edited on Aug 16, 2016 at 10:36pm UTC
Aug 16, 2016 at 10:31pm UTC
int address = a
Because 5 in decimal is the same value as 5 in hexadecimal, which is the same value as 0000 0101 in binary, which is the same value as 12 in ternary, and so on.
You don't need to care how the number is represented. The number is the same value no matter how you choose to represent it.
Last edited on Aug 16, 2016 at 10:31pm UTC
Aug 16, 2016 at 10:33pm UTC
here is my problem i trying this
int a = 10 // 10 in hexadecimal = c
how to do
this LPVOID addres = a in hexadecimal
Last edited on Aug 16, 2016 at 10:36pm UTC
Aug 16, 2016 at 10:36pm UTC
Use code tags, please.
Since `a' is an integer, you need to type-cast it to a void pointer.
Number bases have nothing to do with it.
LPVOID address = reinterpret_cast <void *> (a);
Last edited on Aug 16, 2016 at 10:38pm UTC
Aug 16, 2016 at 10:38pm UTC
Man its WORKS :DDDDDDDDDDD
ty <3