title: error: prototype for does not match any in class
body: <p>I keep getting this error and I cannot see what is wrong, I'm new to c++.</p>
  
  <p>The error is</p>
  
  <blockquote>
    <p>"error: prototype for 'void my_payroll::display_payslip(float, float, float, float)' does not match any in class 'my_payroll'|"</p>
  </blockquote>
  
  <p>Here is the code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  
  class my_payroll
  {
  public: 
  float get_gross(float hours, float rate);
  float paye_method (float gross);
  float usc_method (float gross);
  float prsi(float gross); 
  void display_payslip (float gross, float hours, float rate);
  
  `private: 
  float dm_hours;
  float dm_rate;
  float dm_gross;
  float dm_paye;
  float dm_usc;
  float dm_prsi;
  float dm_netpay;
  };
  
  
  float my_payroll::get_gross(float hours, float rate)
  {
  dm_hours = hours;
  dm_rate = rate;
  return (dm_hours * dm_rate);
  }
  
  float my_payroll::paye_method(float gross)
  {
  dm_gross = gross;
  if (dm_gross &lt;= 630.77)
  {dm_paye = dm_gross * .2;}
  if (dm_gross &gt; 630.77)
  {dm_paye = ((dm_gross - 630.77) * 41) + 126.15;}
  return dm_paye;
  }
  
  float my_payroll::usc_method(float gross)
  {
  dm_gross = gross;
  if (dm_gross &lt;= 193)
  {dm_usc = dm_gross * .02;}
  if (dm_gross &gt; 308)
  {dm_usc = ((dm_gross - 308) *.07) +8.46;}
  if (dm_gross &gt; 193 &amp;&amp; dm_gross &lt;= 308)
  {dm_usc = ((dm_gross - 193) *04) + 3.86;}
  return dm_usc;
  
  }    
  float my_payroll::prsi(float gross)
  {
  dm_gross = gross;
  dm_prsi = (dm_gross * .02 ); 
  return dm_prsi;
  }
  
  
  void my_payroll::display_payslip(float gross, float hours, float rate, float              netpay) &gt; this is the line that I'm getting the error on
  {
  dm_hours = hours;
  dm_netpay = netpay;
  dm_rate = rate;
  dm_gross = gross;
  dm_netpay = (dm_gross - dm_usc - dm_paye - dm_prsi);
  return;
  cout &lt;&lt; "*****************************" &lt;&lt; endl;
  cout &lt;&lt; "\t Gross Pay " &lt;&lt; gross&lt;&lt; endl;
  cout &lt;&lt; "\t prsi " &lt;&lt; prsi &lt;&lt; endl;
  cout &lt;&lt; "\t paye " &lt;&lt; paye&lt;&lt; endl;
  cout &lt;&lt; "\t usc " &lt;&lt; usc &lt;&lt; endl;
  cout &lt;&lt; "\t Net " &lt;&lt; netpay &lt;&lt; endl;
  cout &lt;&lt; "*****************************" &lt;&lt; endl;
  
  }
  
  
  
  
  
  float hours, rate;
  float gross;
  float paye;
  float usc;
  float prsi;
  float netpay;
  
  
  int main()
  
  {
  cout &lt;&lt; "Key in hours worked "  &lt;&lt; endl;
  cin &gt;&gt; hours;
  cout &lt;&lt; "Key in hourly rate " &lt;&lt; endl;
  cin &gt;&gt; rate;
  ]
  
  class my_payroll payroll_object;
  
  gross = payroll_object.get_gross(hours,rate);
  paye = payroll_object.paye_method(gross);
  usc = payroll_object.usc_method(gross);
  prsi = payroll_object.prsi(gross);
  payroll_object.display_payslip(gross);
  </code></pre>