C++ text markov chain generator