encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:27:47: error: expected ';' before 'num2'
27 | else if(!(x&(1<<i)) and (y&(1<<i))num2 = i;
| ^~~~
| ;
encoder.cpp:27:33: warning: statement has no effect [-Wunused-value]
27 | else if(!(x&(1<<i)) and (y&(1<<i))num2 = i;
| ~~~~~~~~~~~~^~~~~~~~~~~~~~
encoder.cpp:28:9: error: expected primary-expression before '}' token
28 | }
| ^
encoder.cpp:27:56: error: expected ')' before '}' token
27 | else if(!(x&(1<<i)) and (y&(1<<i))num2 = i;
| ~ ^
| )
28 | }
| ~
encoder.cpp:28:9: error: expected primary-expression before '}' token
28 | }
| ^
encoder.cpp:31:24: error: 'num2' was not declared in this scope; did you mean 'num'?
31 | else return 10+num2;
| ^~~~
| num