How to implement a bitset in C?
CCAN has a bitset implementation you can use: http://ccan.ozlabs.org/info/jbitset.html But if you do end up implementing it yourself (for instance if you don’t like the dependencies on that package), you should use an array of ints and use the native size of the computer architecture: #define WORD_BITS (8 * sizeof(unsigned int)) unsigned int * bitarray … Read more