title: Calls to flush cout are ineffective
body: <p>I am attempting to have the cout buffer flush to view a string before I manipulate it. Ive attempted to flush the buffer with calls to both <code>std::flush()</code> and <code>std::cout.flush()</code> but neither actually flush my output.  </p>
  
  <p>Only a call to <code>std::endl</code> has successfully flushed the buffer for me.  </p>
  
  <p><strong>Here is my code</strong></p>
  
  <pre><code>std::istringstream stm (game.date());
  int day, month, year;
  char delim = '/';
  
  std::cout &lt;&lt; "Date before: " &lt;&lt; game.date() &lt;&lt; std::flush; // first flush attempt
  std::cout.flush();  // second flush attempt doesnt work
  //std::cout &lt;&lt; std::endl;   // if this is executed the buffer will flush
  
  // Split date string into integers for comparison
  stm &gt;&gt; month &gt;&gt; delim;
  stm &gt;&gt; day &gt;&gt; delim;
  stm &gt;&gt; year &gt;&gt; delim;
  
  std::cout &lt;&lt; "Date after: " &lt;&lt; " | " &lt;&lt; month &lt;&lt; "/" &lt;&lt; day &lt;&lt; "/" &lt;&lt; year &lt;&lt; std::endl;
  </code></pre>
  
  <p><strong>Here is my output</strong><br>
  <em>Date after:  | 1/31/13</em><br>
  <em>Date after:  | 3/21/12</em><br>
  <em>Date after:  | 11/11/11</em><br>
  <em>Date after:  | 10/1/10</em><br>
  <em>Date after:  | 1/2/12</em>  </p>
  
  <p>So as you can see the first call to cout isnt ever flushed but as I said before the buffer will successfully flush with endl, which calls flush itself. I am currently running Ubuntu 12.04 with VirtualBox on my host macbook pro running Mountain Lion.  </p>
  
  <p>Is there anything I may be doing wrong in my flush calls or is this potentially a system issue?</p>