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; 

}

Edited 6 Years Ago by Nick Evan: Please paste your code BETWEEN the 2 tags.

Kindly use code tags or you will not get much help from here.

}while(AreThereMore);

The above line needs to be

}while(AreThereMore());
Comments
Would have been better if you'd stopped at the "use code tags" ;)

The error I get is 'address of while(AreThereMore) will always evaluate to true.'

You need the ()'s when calling the function.

Also I see a couple of things in your AreThereMore() function:

If answer is not true, you need to set it to false. And when you compare you need to check each answer. Instead of

if (reply == 'Y'||'y') //this will always evaluate to true, I believe...because it is asking[I] if reply == 'Y' [/I]OR [I]if 'y'[/I]
{ 
answer=true; 
cin.ignore();
} 
else(reply== 'N'||'n');
{

You can say:

if (reply == 'Y'|| reply =='y')
{ 
answer=true; 
cin.ignore();
} 
else if(reply== 'N'|| reply =='n')
//or just put the else, without a comparison:
else{
//
}

Edited 6 Years Ago by MyrtleTurtle: formatting

hello sorry to bother you all again when i build it is says it was a success but one i debug it it tells me this message

Debug error!
run-time check failure #3- the variable 'answer' is being used without being initialized

This question has already been answered. Start a new discussion instead.