title: creating a display function
body: <p>I am working on this for an assignment and cannot figure out how to even get started to write the function for the following program. </p>
  
  <p>The code given is:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include "BACCOUNT.H"
  using namespace std;
  
  void display(const bankAccount &amp; anAcct)
  {
  
  }
  
  
  int main()
  {
  bankAccount a("Annie Hill", 123.00);
  bankAccount b("Becker" , 45.60);
  display(a);
  display(b);
  return 0;
  }
  </code></pre>
  
  <p>and I need to write a display function that will make the name and balance for bankAccount a and bankAccount b display.</p>
  
  <p>I've been working on this for about 3 days now, and cannot figure out how to even start.</p>
  
  <p>my output needs to be:</p>
  
  <pre><code>bankAccount: Hill, Annie, $123.00
  bankAccount: Becker, Bob, $45.00
  </code></pre>
  
  <p>what I've got so far is;</p>
  
  <pre><code>anAcct.name();
  string name = anAcct.name();
  int space = name.find("5"); 
  name.substr(0, 5);
  name.substr(5, 9);
  name.length();
  
  cout &lt;&lt; name;
  </code></pre>
  
  <p>Which I know is way off, I've just been trying trial and error.</p>