When researching the Augmented Dickey Fuller test, I came across two books that would be good for programmers. They use Python as a reference language, but hey, at least they take the programmer's point of view. Converting to C++ as needed shouldn't be too difficult. 'Think Stats', which is coming out in Edition 2, and 'Think Bayes', which builds on the 'Think Stats' book.