title: Split string in C++
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/236129/how-to-split-a-string-in-c">How to split a string in C++?</a><br>
    <a href="https://stackoverflow.com/questions/2727749/c-split-string">C++ split string</a>  </p>
  </blockquote>
  
  
  
  <p>How I can split a line, shown below, in C++ from a file?</p>
  
  <p>I want to save the result of game  output that has the following format:</p>
  
  <pre><code>CFC 1 - 0 RES
  </code></pre>
  
  <p>I have four variables:</p>
  
  <pre><code>string team1;
  string team2;
  int goalst1;
  int goalst2;
  </code></pre>
  
  <p>How can I split the string so that each corresponding part is in the above four variables?</p>