this is my code:
#include %26lt;iostream%26gt;
#include %26lt;string%26gt;
#include %26lt;iomanip%26gt;
using std::cout;
using std::cin;
using std::endl;
using std::string;
using std::setprecision;
using std::fixed;
//function prototypes
void getInput(string %26amp;, double %26amp;);
void calcFedTaxes(const double %26amp;, const double %26amp;, double %26amp;, double %26amp;, double %26amp;);
void calcNetPay(double %26amp;, double %26amp;, double %26amp;, double %26amp;);
void displayInfo(string %26amp;, double %26amp;, double %26amp;, double %26amp;);
int main()
{
//declare constants and variables
const double FWT_RATE = .2;
const double FICA_RATE = .08;
string name = "";
double salary = 0.0;
double fwtTax = 0.0;
double ficaTax = 0.0;
double netPay = 0.0;
//call funtions to get input
//calculate and display taxes and net pay
getInput(name, salary);
calcFedTaxes(FWT_RATE, FICA_RATE, salary, fwtTax, ficaTax);
calcNetPay(netPay, salary, ficaTax, fwtTax);
displayInfo(name, fwtTax, ficaTax, netPay);
return 0;
} //end of main function
What is wrong with my C++ program? i am doing funtions and i am getting to errors that i don't know how to fix
In calcFedTaxes, you're mixing const doubles with doubles between your declaration (line 14)
void calcFedTaxes(const double %26amp;, const double %26amp;, double %26amp;, double %26amp;, double %26amp;);
and in your implementation (line 50)
void calcFedTaxes(double %26amp;FWT_RATE, double %26amp;FICA_RATE, double %26amp;salary, double %26amp;fwtTax, double %26amp;ficaTax)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment