cm0002@lemmy.world to Programmer Humor@programming.dev · 8 days agoTell me the truth ...piefed.jeena.netexternal-linkmessage-square150fedilinkarrow-up11arrow-down10
arrow-up11arrow-down1external-linkTell me the truth ...piefed.jeena.netcm0002@lemmy.world to Programmer Humor@programming.dev · 8 days agomessage-square150fedilink
minus-squarexthexder@l.sw0.comlinkfedilinkarrow-up0·edit-28 days 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-up0·edit-28 days 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