Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[C++] String To Array of Bytes

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
slippppppppp
Grandmaster Cheater
Reputation: 0

Joined: 08 Aug 2006
Posts: 929

PostPosted: Sun Aug 03, 2008 10:46 am    Post subject: [C++] String To Array of Bytes Reply with quote

I have an Edit Box, and button. Currently, im trying to make it so the text in the edit box converts to Array of Byte.

For example.

Edit1 = "0x09 0x99 0x12";

with a click of a button, i'd want all that into one Array of Byte.

It's probably possible with strtok. But I tried already, and failed :\. I was able to split them up, but i couldn't get them into array of bytes properly to write into memory.

A Code Snippet would help
Back to top
View user's profile Send private message AIM Address MSN Messenger
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sun Aug 03, 2008 11:28 am    Post subject: Reply with quote

Well, you could make a function that converts a string hexadecimal value into an integer value (do you have to write hex values?). And if you do have to write hex values, there are plenty of functions released that convert int to hex and vice versa. Just use google.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Renkokuken
GO Moderator
Reputation: 4

Joined: 22 Oct 2006
Posts: 3249

PostPosted: Sun Aug 03, 2008 11:58 am    Post subject: Reply with quote

Answered via MSN.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites