title: What can cause cout << variable << "\t"; to print blankspace instead of a value, when the output exceeds terminal width?
body: <p>I have a series of three loops that each cout a row of <code>\t</code> delimited values</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  #include &lt;cstdlib&gt;
  using namespace std;
  
  struct the_struct {
      float a_float;
      the_struct() :a_float(0){}
  };
  
  class the_class {public: the_struct a_struct;};
  
  int main ()
  { 
      vector &lt;the_class&gt; v_objects;
      for(int q=0; q &lt; 30; q++)
          v_objects.push_back(the_class());
  
      srand(0);
      int* int_dynamic_array = new int [30];
      for(int q=0; q &lt; 30; q++)
          int_dynamic_array[q] = rand() % 30;
  
      for(int q=0; q &lt; 30; q++)
          cout &lt;&lt; q &lt;&lt; "\t";
      cout &lt;&lt; "\n";
      for(int q=0; q &lt; 30; q++)
          cout &lt;&lt; v_objects[q].a_struct.a_float &lt;&lt; "\t";   //at runtime, these are all zeros
      cout &lt;&lt; "\n";
      for(int q=0; q &lt; 30; q++)
          cout &lt;&lt; int_dynamic_array[q]  &lt;&lt; "\t";           //random values between 0 and 29 
      cout &lt;&lt; "\n";
  }
  </code></pre>
  
  <p>For some reason, this code only prints exactly 11 values from the 2nd loop, and randomly omits between 0 and 4 values from the third loop. The first loop never has problems. For example (without tabs):</p>
  
  <pre><code>0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29  
  0 0 0 0 0 0 0 0 0 0 0   
  4 7 2 9 7 4 3 1 6 5 26 12 8  28 13 11 22 7  19 2  26 13 9  12 15 24 8    
  </code></pre>
  
  <p>Strangely, if I modify the tab string from <code>"\t"</code> to <code>"x\t"</code>, the program now outputs every value, but obviously with an x after each. For example:</p>
  
  <pre><code>0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 
  </code></pre>