The same can be done using standard bit operations, without resorting to bit fields! Try it out and you should get much cleaner code (lots of unnecessary repetitions in your code)
At last found one bit datatypes
How about creating a number array in C with each element using just one bit of memory?There is no doubt that there are no datatypes in C who...
Check out: http://en.wikipedia.org/wiki/Bit_field#Drawbacks_of_the_structure-based_approach for some potential problems with bitfields.
Add a comment...