I simply cannot figure this out:
I am doing some work on hex values, and I need to output values as sets of 2: 00 FF 03 4D etc...
My problem is that the values with a leading 0 (04 00 0F etc) are coming out only as 4 0 F.
Here is what I am using to output:
cout << hex << (buffer&0xff)<<endl;
any suggestions as to what I can do???
I am doing some work on hex values, and I need to output values as sets of 2: 00 FF 03 4D etc...
My problem is that the values with a leading 0 (04 00 0F etc) are coming out only as 4 0 F.
Here is what I am using to output:
cout << hex << (buffer&0xff)<<endl;
any suggestions as to what I can do???