encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:7:24: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
if (x & (1<<i) == 1)
^
decoder.cpp: In function 'int decode(int, int, int)':
decoder.cpp:5:32: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
return (q & (1 << (h-10)) == 1) ? 1 : 0;
^
decoder.cpp:7:29: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
return (q & (1 << h) == 0) ? 1 : 0;
^