Results 1 to 1 of 1
I am trying to convert bytes in a string to hex and would like to find a simple way to do this.
I have type casted the individual characters of ...
- 07-30-2008 #1Just Joined!
- Join Date
- Jul 2008
- Posts
- 7
converting chars to hex
I am trying to convert bytes in a string to hex and would like to find a simple way to do this.
I have type casted the individual characters of a string to unsigned ints and printed them to the screen using the following code in hex, but I know if this only converts the decimal value to hex...is this really the hex representation of the bytes representing the character?
Thank you for your time!Code:for(i=0;i<=37;i++){ printf("%x",(unsigned int)input[i]); }
windell


Reply With Quote