You are not converting between decimal and hex. You are converting between signed and unsigned.
CODE
#include <iostream.h>
void main()
{
short i = -3;
unsigned short u;
cout << (u = i) << "\n";
}
Isntead of short, you can have long, double, or byte.
[right][snapback]272145[/snapback][/right]