getting 8 bits from a 32 bit variable

Started by
10 comments, last by _nomad_ 19 years, 10 months ago
byte_ptr bytes = (byte_ptr)&var32bita = bytes[0];b = bytes[1];c = bytes[2];d = bytes[3];


[edited by - Atm97fin on June 1, 2004 4:25:10 AM]
EasyGL - easy to use graphics library.
Advertisement
*portable code reminder*

remember to note if you''re on a big or little endian system, because if you go from x86 -> sparc or powerpc your code won''t work properly anymore

This topic is closed to new replies.

Advertisement