i have binary file as input and i need to read it simple by bits. If i wanted to read file by characters i would use this:
ifstream f(inFile, ios::binary | ios::in);
char c;
while (f.get(c)) {
cout << c;
}
Output of this code is sequence of characters, what i need is sequence of 1 and 0. Function get() return next character and i could not find any ifstream function that would return next bit.
Is there any similar way how to achieve it ?
Thank anyone for help.