9 Jul
2010
9 Jul
'10
3:02 p.m.
change to "unsigned char". You're getting bitten by sign extension. On 7/9/2010 9:57 AM, Lloyd wrote:
Thansk Igor, it works in that case. But it is not working in this case...
char a[10]; a[0]=0xFA; stringstream ss; ss<<boost::format("%|02X|")%(int)(a[0]); cout<<ss.str()<<endl;
It prints FFFFFFFA