How do you read a binary file in memory bit-by-bit?
ifstream file ("my.bin", ios::in|ios::bi nary|ios::ate);
if (file.is_open() )
{
size = file.tellg();
memblock = new char [size];
file.seekg (0, ios::beg);
file.read (memblock, size);
I was using file.get() but returns the next char I really want the next bit.
Any help is appreciated. :-)
ifstream file ("my.bin", ios::in|ios::bi nary|ios::ate);
if (file.is_open() )
{
size = file.tellg();
memblock = new char [size];
file.seekg (0, ios::beg);
file.read (memblock, size);
I was using file.get() but returns the next char I really want the next bit.
Any help is appreciated. :-)
Comment