Well screentest pops up, and when I press "Ok", the horizontal and vertical are then printed. I can live with it -- jut wanted to know whether this is a permanent condition or whether there wa a workaround.
Re: race condition (sort of)? message box verus function return
It doesn't speed anything up. There's also no race condition, because these commands are all done on a single thread.
Output streams write to a memory buffer. That memory buffer needs to be flushed so that it is actually sent to the output device (which could be anything, not just a simple terminal). C and C++ separate writing and flushing to give you more control. If you don't care about that control, just use std::endl to write a newline and force a flush.