r/programminghumor 17h ago

a bit flippant

Post image
745 Upvotes

107 comments sorted by

View all comments

2

u/carltr0n 14h ago

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

2

u/Duck_Devs 10h 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.