Hi everyone,
I am doing some low end stuff in Linux or Unix environment, just wondering how can I read a sequence of bit from file to memory, and make some change on it and then write it back to the file?
also I have tried
==========================================
ofstream out(somefile.c_str());
struct Bits {
unsigned char * b:6; // create a bit field with
// 6 bits
} theBit;
for (int i = 0; i < 20; i++) {
theBit.b = 'b';
out << theBit.b;
}
============================================
and the file size is 20 bytes instead of 20x6 bits (15 bytes)
anyone know why?
thanks first...