hello to everyone i am new to this stuff so i was wondering if anyone could help me fix this error that i get on a code that is for a payroll assignment. when i build it i get this C4551: function call missing argument list. would really like the help thanks and sorry for putting the whole code i don't really know what needs to be fix, thanks again.
#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
string GetName();
int GetHours();
double GetPayrate();
const double tax = .28;
double ComputeBasePay(int hours,double payRate);
double ComputeOvertimePay(double payRate,int hours);
double ComputeGrossPay(double basePay,double overtime);
double ComputeFederalTax(double grossPay,double tax);
double ComputeNetPay(double grossPay,double fedtax);
void DisplayHeading();
void DisplayColumn();
void DisplayLine(string name,int hours,double payRate,double basePay,double overtime,double grossPay,double fedtax,double netPay);
bool AreThereMore();
int main()
{
string name;
int hours;
double payRate;
double basePay;
double overtime;
double grossPay;
double fedtax;
double netPay;
DisplayHeading();
do
{
name = GetName();
hours = GetHours();
payRate = GetPayrate();
basePay = ComputeBasePay(hours,payRate);
overtime = ComputeOvertimePay(payRate,hours);
grossPay = ComputeGrossPay(basePay,overtime);
fedtax = ComputeFederalTax(grossPay,tax);
netPay = ComputeNetPay(grossPay,fedtax );
DisplayColumn();
DisplayLine(name,hours,payRate,basePay,overtime,grossPay,fedtax,netPay);
AreThereMore();
}while(AreThereMore);
cin.get();
return 0;
}
void DisplayHeading()
{
cout<<setw(50)<<right;
cout <<"Disney Employee Report \n";
cout<<setw(50)<<right;
cout <<"Week of April 13, 2010 \n";
}
string GetName()
{
string Name;
cout <<"\nEnter employees's name: ";
getline(cin,Name);
cin.ignore();
return Name;
}
int GetHours()
{int hours;
cout<<"Enter hours worked by employee: ";
cin>>hours;
return hours;
}
double GetPayrate()
{ double payRate;
cout<<"\nEnter employee's pay rate: ";
cin>>payRate;
return payRate;
}
double ComputeBasePay(int hours, double payrate)
{
double basepay;
if (hours<=40)
{
basepay=hours*payrate;
}
else
basepay=40*payrate;
return basepay;
}
double ComputeOvertimePay(double payRate,int hours)
{
double overtime = 0.0;
if (hours>40)
{
overtime = 1.5*payRate*(hours-40);
}
return overtime;
}
double ComputeGrossPay(double basePay,double overtime)
{
double grossPay;
grossPay = basePay+overtime;
return grossPay;
}
double ComputeFederalTax(double grossPay, double tax)
{
double fedtax;
if (grossPay>300)
{
fedtax=grossPay*tax;
}
else
fedtax = 0.00;
return fedtax;
}
double ComputeNetPay(double grossPay,double fedtax)
{
double netPay;
netPay = grossPay-fedtax;
return netPay;
}
void DisplayColumn()
{
cout<<"\nEmployee name Hours Rate Base Overtime Gross Fedtax Net Pay \n";
}
void DisplayLine(string name,int hours,double payRate,double basePay,double overtime,double grossPay,double fedtax,double netPay)
{
cout<<name<<setw(7)<<hours<<setw(8)
<<fixed<<showpoint<<setprecision(2)<<payRate<<setw(8)<<basePay<<setw(8)<<overtime<<setw(8)
<<grossPay<<setw(8)<<fedtax<<setw(8)<<netPay<<endl;
}
bool AreThereMore()
{
bool answer;
char reply;
cout<<"\nAre there more employees to process (Y or N)? ";
cin>>reply;
if (reply == 'Y'||'y')
{
answer=true;
cin.ignore();
}
else(reply== 'N'||'n');
{
cout<<"Have a nice day. Bye.";
}
return answer;
}