title: Reading from a file using an overloaded >> operator
body: <p>I'm attempting to read from a file a customer's name, id, and loan information. The file is setup like this:</p>
  
  <pre><code>Williams, Bill
  567382910
  380.86
  Davidson, Chad
  435435435
  400.00
  </code></pre>
  
  <p>Basically, every time I come to a new name, the information is going to be placed into a new object of the Customer class. My problem is, I'm trying to read from the file but I'm not sure how to overload the operator correctly to read only 3 lines from the file like I want to and put them in the right place.</p>
  
  <p>I create the customer and open the file here:</p>
  
  <pre><code>Menu::Menu()
  {
  Customer C;
  ifstream myFile;
  
  myFile.open("customer.txt");
  while (myFile.good())
  {
    myFile &gt;&gt; C;
    custList.insertList(C);
  }
  }
  </code></pre>
  
  <p>This is just what I have in my .cpp file for a Menu class. Here is my code (the tiny bit that I know how to do) for the overloaded operator in my .cpp file for the Customer class.</p>
  
  <pre><code>istream&amp; operator &gt;&gt; (istream&amp; is, const Customer&amp; cust)
  {
  
  
  }
  </code></pre>
  
  <p>I'm not sure how to only get the three lines and place them into their respective places inside of a Customer which are:</p>
  
  <pre><code>string name
  string id
  float loanamount
  </code></pre>
  
  <p>If anyone could help me out with this I'd really appreciate it.</p>