title: ERROR "cannot convert 'float' to 'float...'..."
body: <p>There are probably other little formatting errors in here that I'll need to fix, etc. but what I need help with is what to do with the following: </p>
  
  <blockquote>
    <p>Lab8pt1.cpp: In function 'float Salary(float, float)':<br>
    Lab8pt1.cpp:48: error: assignment of function 'float Salary(float, float)'<br>
    Lab8pt1.cpp:48: error: cannot convert 'float' to 'float ()(float, float)' in assignment<br>
    Lab8pt1.cpp:50: error: assignment of function 'float Salary(float, float)'<br>
    Lab8pt1.cpp:50: error: cannot convert 'double' to 'float ()(float, float)' in assignment<br>
    Lab8pt1.cpp:51: error: cannot convert 'float (*)(float, float)' to 'float' in return  </p>
  </blockquote>
  
  <p>I know it's referring to my Salary function, but I'm not sure what the issue with my float is. This is just supposed to be a simple Lab Assignment that teaches us how to use functions (we only have to write the code for the functions, the rest was given to us). </p>
  
  <p>Help, please! Thanks in advance!    </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;iomanip&gt;
  #include &lt;string&gt;
  
  using namespace std ;
  
  void Header(void) ;            
  float Salary(float Hours, float Pay_Rate);  
  void Print_it(float Hours,float Pay_Rate,float Sal, float Tax_Rate, string Name);  
  void Read(float &amp;hour, float &amp;Pay_R,string &amp;name) ;
  bool Verify(float Hours, float Pay_Rate);  
  
  int main ( void )
  {
      float   Pay_Rate, Hours, Sal, Tax;
      const float  Tax_Rate= (float)0.09 ;
      string name;
  
      Header();
      for(int i = 0 ; i &lt; 3 ; i++){
           Read(Hours,Pay_Rate,name);
           Sal = Salary(Hours,Pay_Rate);
           Print_it(Hours,Pay_Rate,Sal, Tax_Rate,name);    
      }
      cout&lt;&lt;"\n\n\n**********\t End of report \t*****\n\n\n\n";
      return 0 ;
  }
  
  void Header( void )
  {
       string name;
       cout &lt;&lt; "Welcome, " &lt;&lt; name &lt;&lt; ", to the Salary Calculator: a program that will calculate your salary.";
       return;
  } 
  
  float Salary(float Hours, float Pay_Rate)
  {
       if( Hours &lt;= 40 )
           Salary = Hours * Pay_Rate;
       else if( Hours &gt; 40)
           Salary = Hours * (Pay_Rate * 1.5);
       return(Salary);
  }
  
  void Print_it(float Hours,float Pay_Rate,float Sal, float Tax_Rate, string Name)
  {
       cout &lt;&lt; fixed &lt;&lt; setprecision(2);
       cout &lt;&lt; "Name: " &lt;&lt; left &lt;&lt; setw(15) &lt;&lt; Name &lt;&lt; endl;
       cout &lt;&lt; "Hours worked: " &lt;&lt; left &lt;&lt; setw(15) &lt;&lt; Hours &lt;&lt; endl;
       cout &lt;&lt; "Pay rate: " &lt;&lt; left &lt;&lt; setw(15) &lt;&lt; Pay_Rate &lt;&lt; endl;
       cout &lt;&lt; "Tax rate: " &lt;&lt; left &lt;&lt; setw(15) &lt;&lt; Tax_Rate &lt;&lt; endl;
       cout &lt;&lt; "Salary: " &lt;&lt; left &lt;&lt; setw(15) &lt;&lt; Sal &lt;&lt; endl;
       return;
  }
  
  void Read(float &amp;hour, float &amp;Pay_R,string &amp;name) 
  {
       cout &lt;&lt; "Please enter your name: ";
       getline(cin, name);
       cout &lt;&lt; "Please enter number of hours worked: ";
       cin &gt;&gt; hour;
       cout &lt;&lt; "Please enter your pay rate: ";
       cin &gt;&gt; Pay_R;
       return;
  }
  
  bool Verify(float Hours, float Pay_Rate)
  {
       if( Hours &lt; 0 || Hours &gt; 60 || Pay_Rate &lt; 0 || Pay_Rate &gt; 500)
           return false;
       else
           return true;
  }  
  </code></pre>