C++ code for binary decision trees