We're doing some experiment on random number. The data given me is stored in a .bin file, and according to the provider, it's stored in independent bits, that is, every bit is the supposed bool random variable.
Now I would like to use this input in program, but as bool take 1 BYTE and int take 4 bytes, I don't know how to read it into a variable in C++. And it seems that the ifstream.read(s,n) also only takes n as number of char.
Is there any way to read bit data from file? Thank you!