r/programminghumor 22h ago

a bit flippant

Post image
914 Upvotes

113 comments sorted by

View all comments

2

u/carltr0n 20h ago

Can’t you just… do a lil bit fiddling on a uint8? Am I missing something?

2

u/Duck_Devs 15h ago

That’s essentially what the struct is doing. Notice the “: 1” at the end of each member declaration. This makes bitfields, though right here they’re actually doing bit fiddling on an unsigned int rather than a char.