-
August 17th, 2011, 10:08 PM
#1
join 2 unsigned char
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
-
August 17th, 2011, 10:25 PM
#2
Re: join 2 unsigned char
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).
-
August 17th, 2011, 11:29 PM
#3
Re: join 2 unsigned char
Code:
unsigned short temp = (0x3e << 8) + 0x20;
-
August 18th, 2011, 02:32 AM
#4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|