I came across a syntax I've never seen before.
typedef struct SomeStruct
{
unsigned char ip_version :4;
unsigned char ip_tos;
unsigned char ip_frag_offset :5;
unsigned char ip_more_fragment :1;
unsigned char ip_dont_fragment :1;
unsigned char ip_reserved_zero :1;
unsigned char ip_frag_offset1;
unsigned char ip_ttl;
} SomeHeader;
What is the colon #;
for? Is that the same as using the assignment operator? Why use the colon and is there advantages or a reason this is allowed?