what does the ":" do in this code...
Code:union aword { DWORD dword; BYTE byte [4]; struct { unsigned int byte3:8; unsigned int byte2:8; unsigned int byte1:8; unsigned int byte0:8; } w; };
what does the ":" do in this code...
Code:union aword { DWORD dword; BYTE byte [4]; struct { unsigned int byte3:8; unsigned int byte2:8; unsigned int byte1:8; unsigned int byte0:8; } w; };
It sets the size of the field (variable) in bits. So each of the unsigned ints will use 8 bits to represent its value.
zen