cm0002@lemmy.world to Programmer Humor@programming.dev · 8 个月前Tell me the truth ...piefed.jeena.netimagemessage-square169linkfedilinkarrow-up11.19Karrow-down117
arrow-up11.17Karrow-down1imageTell me the truth ...piefed.jeena.netcm0002@lemmy.world to Programmer Humor@programming.dev · 8 个月前message-square169linkfedilink
minus-squarexthexder@l.sw0.comlinkfedilinkarrow-up41·8 个月前Or just std::bitset<8> for C++. Bit fields are neat though, it can store weird stuff like a 3 bit integer, packed next to booleans
minus-squareSonotsugipaa@lemmy.dbzer0.comlinkfedilinkEnglisharrow-up10·8 个月前That’s only for C++, as far as I can tell that struct is valid C
Or just
std::bitset<8>for C++. Bit fields are neat though, it can store weird stuff like a 3 bit integer, packed next to booleansThat’s only for C++, as far as I can tell that struct is valid C