How to implement Classification and Anomaly detection (C++)
You can try using SVM if your dataset is medium-sized or small (500-10000). You train the model with two classes: normal or anomaly (your output would be the probability of being of one class or the other).

A great library in C++ is libSVM (https://www.csie.ntu.edu.tw/~cjlin/libsvm/) which allows to perform classification or regression tasks. 

There is a grest section of Dr NG's coursera ml class that focuses on anomaly detection. I would expect your classes to be imbalanced (you have much more normal cases than anomalies so you need to think about how to deal with this issue, also how do you choose the probability threshold to classify data as anomaly or not)

There are other choices of course: K-means can be used + some rule or another classifier. I would suggest you watch the Andrew NG class try his method (pdf kernel estimation) and once you got the hang of it try another model (such as SVM).