Bit Fields in C++
Whether we are dealing with network protocols or device drivers, system-level programming often involves bit fields. As a system programming language, C offers a concise syntax to specify bit fields in C strctures, for example struct CStylePacket { u16 a : 3 ; u16 b : 9 ; u16 c : 2 ; }
评论
?
参与讨论