title: C++ read string with spaces
body: <p>I have file like this:</p>
  
  <pre><code>59 137 New York
  137 362 Syracuse
  216 131 New Jersey
  ...
  ..
  .
  </code></pre>
  
  <p>and I would like to read it to a structure:
  X - Y - name of a city</p>
  
  <pre><code>  char city[100];
    int x , y;
    f.open("map.txt");
    f &gt;&gt; x &gt;&gt; y &gt;&gt; city;
    while (!f.fail()) {
      f &gt;&gt; x &gt;&gt; y &gt;&gt; city;
    }
    f.close();
  </code></pre>
  
  <p>Problem is, that city reads only until next space, so from New York it reads only New.
  How should I read whole rest of a line, in some easy and smart way ?</p>