I promise, this is my last question for the day!
I'm trying to query bits within an element of an unsigned character array.
Basically, this should return true if there is a bit at that index.
Any advice will be greatly appreciated!!
Shouldn't a query be something like (A&B) == B?
where B is the Mask?
No. Look at: a = 00110011
b = 00001000 //3rd bit
a&b = 00000000 //not a or b
As for your code:
How can you query a specific bit in an index with only the index? Wouldn't you need another parameter for which bit you want to check?