Here is some code for a bitmap along with a main to test it.
This has two functions.
- void setbit(int bitnum, int value) which sets a bit. The first
argument must be between 0 and 255, the second must be either 0 or 1.
- int getbit(int bitnum) returns the value of a bit. The argument
must be between 0 and 255, and the return value will be either 0 or 1.
Here is the code. Do whatever you want with it.