 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
slippppppppp Grandmaster Cheater
Reputation: 0
Joined: 08 Aug 2006 Posts: 929
|
Posted: Thu Jan 15, 2009 6:25 pm Post subject: C++ Byte Reading |
|
|
Okay what im trying to do is, read a certain address, and be able to print out it's bytes in String format. For example :
00400000 : F0 65 00
Btw, its direct memory access.
Any help will be appreciated
|
|
| Back to top |
|
 |
smartz993 I post too much
Reputation: 2
Joined: 20 Jun 2006 Posts: 2013 Location: USA
|
Posted: Thu Jan 15, 2009 6:30 pm Post subject: |
|
|
Store bytes in a buffer, use memcpy.
Then you can...
| Code: |
char buffer[2];
for(int i = 0; i < NumberOfBytesToDisplay; i++)
{
sprintf(buffer,"%02X ",memorybuffer[address+i]);
strcat(Bytes,buffer);
}
|
Bytes now has the bytes in char format. (String or char array)(i know that you use BC++, so just use...String.sprintf function)
also, if you are using regular char's and you are strcat'ing and not strcpy'ing before you do so, make sure you zero the memory, or initialize the buffer of Bytes.
|
|
| Back to top |
|
 |
crayzbeef Expert Cheater
Reputation: 0
Joined: 21 Jan 2007 Posts: 101
|
Posted: Sat Jan 17, 2009 3:36 am Post subject: |
|
|
| smartz993 wrote: | Store bytes in a buffer, use memcpy.
Then you can...
| Code: |
char buffer[2];
for(int i = 0; i < NumberOfBytesToDisplay; i++)
{
sprintf(buffer,"%02X ",memorybuffer[address+i]);
strcat(Bytes,buffer);
}
|
Bytes now has the bytes in char format. (String or char array)(i know that you use BC++, so just use...String.sprintf function)
also, if you are using regular char's and you are strcat'ing and not strcpy'ing before you do so, make sure you zero the memory, or initialize the buffer of Bytes. |
Why the hell do people write C - C++ code..
C != C++.
Learning programming through game hacking sure does make people retarded.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|