| View previous topic :: View next topic |
| Author |
Message |
slippppppppp Grandmaster Cheater
Reputation: 0
Joined: 08 Aug 2006 Posts: 929
|
Posted: Sun Aug 03, 2008 10:46 am Post subject: [C++] String To Array of Bytes |
|
|
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 |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Sun Aug 03, 2008 11:28 am Post subject: |
|
|
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 |
|
 |
Renkokuken GO Moderator
Reputation: 4
Joined: 22 Oct 2006 Posts: 3249
|
Posted: Sun Aug 03, 2008 11:58 am Post subject: |
|
|
| Answered via MSN.
|
|
| Back to top |
|
 |
|