I've been trying to concatenate 4 hex numbers and can't seem to do it.
Example:
int a = 0x01;
int b = 0x00;
int c = 0x20;
int d = 0xF1;
//Result should be 0x010020F1
The results that I am getting using sprintf()
and bitwise operations always have cut off zeros, giving me answers like 1020F1, which is much different than what I want. Anybody have a better method?