title: How to parse and store team information from files into classes?
body: <p>I have a few files that contain nba teams and their starters, and i need to add this information into my program then do a few tasks with them.</p>
  
  <p>I am currently stuck on being able to parse the files.</p>
  
  <p>The files look like this:</p>
  
  <p><code>Team Name, Point guard, shooting guard, small forward, power forward, center</code></p>
  
  <p>For example:</p>
  
  <p><code>Chicago Bulls, Derrick Rose, Kyle Korver, Luol Deng, Carlos Boozer, Joakim Noah
  Denver Nuggest, .. etc.</code></p>
  
  <p>I want to be able to only add the names of the team, point guard, and small forward, and I'm not sure on how to do that. </p>
  
  <p>What i have so far:</p>
  
  <pre><code> 17         ifstream* myIN = new ifstream();
   18         myIN-&gt;open(filename.c_str());
   19 
   20         string teamName;
   21 
   22         *myIN &gt;&gt; teamName;
   23         
   24         while(!myIN-&gt;eof()){
   25                 TEAM.push_back(teamName);
   26                 //TODO
   27         }      
  </code></pre>
  
  <p>I am looking into using "find()" to find each comma, but i don't know how to only record the information before and after the first comma, and after the 3rd comma. </p>
  
  <p>Any sort of guidance would be much appreciated.</p>