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 ; }

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论