title: C++ Read File Until Space
body: <p>Is there a way I can read data from a file until a space? I have a file</p>
  
  <p><code>John J. Doe</code></p>
  
  <p>and I want to read the file and put <code>John</code> in 1 variable, <code>J.</code> in another variable and <code>Doe</code> in a final variable. How do I do this with ifstream?</p>