title: an error within context
body: <p>can somebody please explain my mistake, I have this class:</p>
  
  <pre><code>class Account
  {
  private:
      string strLastName;     
      string strFirstName;    
      int nID;              
      int nLines;             
      double lastBill;
  public:
      Account(string firstName, string lastName, int id);
      friend string printAccount(string firstName, string lastName, int id, int lines, double lastBill);
  }
  </code></pre>
  
  <p>but when I call it:</p>
  
  <pre><code>string reportAccounts() const
  {
      string report(printAccountsHeader());
      for(list&lt;Account&gt;::const_iterator i = listOfAccounts.begin(); i != listOfAccounts.end(); ++i)
      {
          report += printAccount(i-&gt;strFirstName, i-&gt;strLastName, i-&gt;nID, i-&gt;nLines, i-&gt;lastBill);;
      }
          return report;
  }
  </code></pre>
  
  <p>I receive error <code>within context</code>, can somebody explain why?</p>