I found one problem in your code. You need to use && instead of &. For comparison, && is a logical operator and differs from & - a bitwise operator.
Example:
if ((m = (bit_table_ [k] [i] [index bit] & mask bit [bit])) == true)
To learn about the operator in C ++, you can visit: http://www.worldbestlearningcenter.com/index_files/c++_operators.htm
source
share