You can´t directly fread bits in a bool array
(you would have to read bytes and assign each 8 bits of each byte manually).
Another solution, which consumes less memory too:
An array of 8 chars.
Can be fread-ed directly, and the bits are accessed by binary Or/And & |
If you have a char c and a bit number n between 0 and 7:
Set bit n in c to 1:
c |= 1<<n;
Set bit n in c to 0:
c &= ~(1<<n);
Check if bit n in c is 1:
if(c & (1<<n))