You've got your access specifiers the wrong way round (functions should in general be public and member variables private) and you should define your destructor as either {} or =default;. Also b.close; is invalid, all functions are invoked with ().
Could you give the error message? Usually it tells you what is wrong.
In any case, lines 30, 37, 54, and 61 have bad conditions, as 't' or 'B' will always evaluate to true, resulting in the entire condition always being true.