i needed to join 2 unsigned char as in
Code:
unsigned short temp = 0x3e + 0x20 ;
// I do not want to add them
// resulting short should look like 0x3e20
Printable View
i needed to join 2 unsigned char as in
Code:
unsigned short temp = 0x3e + 0x20 ;
// I do not want to add them
// resulting short should look like 0x3e20
One way is to use a left shift and then a bitwise or (or just add), but note that the result is unlikely to fit into an unsigned char (without changing its value).
Code:unsigned short temp = (0x3e << 8) + 0x20;
thank you