as far as i understand (which isn't that far) hex numbers == decimal numbers
an ascii char is a value. you need to put it in a string or something. to print it in hex you could do this:
Code:
unsigned char value = 56; // any value < 256 will do
char let1,let2;
let1 = value / 16;
let2 = value % 16;
if (let1 > 9) let+='A' - 10;
else let+='0';
if (let2 > 9) let+='A' - 10;
else let+='0';
cout << let1 << let2;
i'll bet that printf has a way of printing hex without this. i'll almost positive of it. and cout probably can, too.