Naive Bayes in C++