struct _USBCHECK_FLAGS
{
unsigned char DEVICE_DEFAULT_STATE : 1;
unsigned char DEVICE_ADDRESS_STATE : 1;
unsigned char DEVICE_CONFIGURATION_STATE : 1;
unsigned char DEVICE_INTERFACE_STATE : 1;
unsigned char FOUR_RESERVED_BITS : 8;
unsigned char RESET_BITS : 8;
} State_bits;
What does :1 and :8 mean?
Those are bit fields. Basically, the number after the colon describes how many bits that field uses. Here is a quote from MSDN describing bit fields:
Edit: another important bit from the MSDN link:
A quick sample illustrates this nicely. Interestingly, with mixed types the compiler seems to default to
sizeof (int).