cm0002@lemmy.world to Programmer Humor@programming.dev · 2 months agoTell me the truth ...piefed.jeena.netimagemessage-square161linkfedilinkarrow-up1415arrow-down16
arrow-up1409arrow-down1imageTell me the truth ...piefed.jeena.netcm0002@lemmy.world to Programmer Humor@programming.dev · 2 months agomessage-square161linkfedilink
minus-squarexthexder@l.sw0.comlinkfedilinkarrow-up11·edit-22 months agoOr 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-up4·edit-22 months agoThat’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