This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Converting unsigned char[] to long?

How can you access the individual bytes making up a variable of type long? What I need to do is move a 24-bit (3 bytes) unsigned char array into a long variable. An example:

unsigned char a[3];
unsigned long b;

a[0] = 0x02;
a[1] = 0xFF;
a[2] = 0xFF;

?????
?????


TIA!
James

0