I am just contemplating whether or not I should use bit fields on my struct's members to minimize the size of the struct.
in my book (Teach Yourself C Third Edition) it says that the type of a bit field is either int or unsigned, and that if its a signed int that the high order bit will be treated as the sign bit if possible.
now int and unsigned are both 32-bit ints. does this mean that I can only use bit fields on members declared as 32-bit types?
also, it mentions that the smallest addressable unit of memory is a byte, thus meaning, you cannot obtain the address of a bit field. how about obtaining the address of the struct that the bit fields are members of? is that possible?
as I said this is all an attempt to minimize the size of my code. since the bit fields I'd use would be small, if this is possible, it will substantially reduce the size of the struct.
any help here is greatly appreciated. thank you in advance!