title: Why splitting a filebuffer by space character doesn't work?
body: <p>Given the following code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;sstream&gt;
  #include &lt;vector&gt;
  
  int main()
  {
      std::stringstream istrs("1 2 3 4 5 6");
      std::vector&lt;int&gt; vec;
      while(!istrs.eof())
      {
          int temp;
          std::stringstream o;
          istrs.get(*o.rdbuf(), ' ');
          o &gt;&gt; temp;
          vec.push_back(temp);
      }
      for(auto a : vec)
          std::cout &lt;&lt; a &lt;&lt; " ";
      std::cout &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>Why does the loop never exit? Why does <code>o</code> remain uninitialized?
  I'm trying to split the ifstream buffer into smaller chunks for processing but I don't know why this <code>get()</code> doesn't work like I thought it would.</p>