Sometimes c++ plays me big time. I really can\'t think of why this does/doesn\'t work and I\'d be happy if any of you knew.
I call this function once every second on a t
Switch over to using std::cerr as an experiment and I would bet you that it prints fine every time because standard error is not buffered while cout/printf (standard out) is buffered. Placing a std::endl at the end will buffer flush and put a new line out for cout which should work as well. You could also simply work on standard out and call a flush function on the stream to ensure its printed to console which would be similar.