OneR machine learning algorithm implemented in C++