cm0002@lemmy.world to Programmer Humor@programming.dev · 1 year agoTell me the truth ...piefed.jeena.netimagemessage-square167linkfedilinkarrow-up1987arrow-down115cross-posted to: programmerhumor@lemmy.ml
arrow-up1972arrow-down1imageTell me the truth ...piefed.jeena.netcm0002@lemmy.world to Programmer Humor@programming.dev · 1 year agomessage-square167linkfedilinkcross-posted to: programmerhumor@lemmy.ml
minus-squarexthexder@l.sw0.comlinkfedilinkarrow-up37·1 year 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-up9·1 year 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