Tutorial by Examples

struct FileAttributes { unsigned int ReadOnly: 1; unsigned int Hidden: 1; }; Here, each of these two fields will occupy 1 bit in memory. It is specified by : 1 expression after the variable names. Base type of bit field could be any integral type (8-bit int to 64-bit int). Using u...

Page 1 of 1