Is there any fast way to convert given byte (like, by number - 65) to it's text hex representation?
Basically, I want to convert array of bytes into (I am hardcoding resources) their code-representation like
BYTE data[] = {0x00, 0x0A, 0x00, 0x01, ... }
How do I automate this Given byte -> "0x0A" string conversion?
In C++, you can use stringstream, and ssprintf.
Some compilers may have an itoa method that will convert an integer into its textual representation.
These are portable functions. You can always add an integer to '0' to get a textual digit and likewise with 'A' and 'a'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With