kryptiskt 5 days ago

Like, say I have a data structure that is four bits wide (consisting of a couple of flags or something) and I want to make an array of them and access them randomly. What help do I get from C to do this? C says "fuck you".

2
cv5005 5 days ago

Pick an appropriate base type (uintN_t) for a bitset, make an array of those (K * N/4) and write a couple inline functions or macros to set and clear those bits.

codr7 5 days ago

Only if you don't know C.

Otherwise is says, do whatever you feel like.