How to turn a hex string into an unsigned char array?

Viewed 54909

For example, I have a cstring "E8 48 D8 FF FF 8B 0D" (including spaces) which needs to be converted into the equivalent unsigned char array {0xE8,0x48,0xD8,0xFF,0xFF,0x8B,0x0D}. What's an efficient way to do this? Thanks!

EDIT: I can't use the std library... so consider this a C question. I'm sorry!

7 Answers
Related