void populate_array(const int Row, const int Column, stringF F_name[],stringL L_name[], stringID ID[],double Hours[],double Rate[])//function poplulates array with user input values
{
int Counter=0, Counter2=1;
while (Counter < Row)
{
cout<<"please input the first name of employee number maximum of 15 letters "<<Counter2<<endl;
cin>>F_name[Counter];
cout<< "please input the last name of employee number maximum of 15 letters "<< Counter2<<endl;
cin>>L_name[Counter];
cout<< "please input the ID# of employee number "<< Counter2<<endl;
cin>>ID[Counter];
cout<< "please input the hours worked of employee number "<< Counter2<<endl;
cin>>Hours[Counter];
while (Hours[Counter]< 40|| Hours[Counter]> 60)
{
cout<< "invalid input, please input the hours worked of employee number "<< Counter2<<endl;
cin>>Hours[Counter];
}
cout<< "please input the hours worked of employee number "<< Counter2 <<endl;
cin>>Rate[Counter];
while (Rate[Counter] < 0)
{
cout<< "invalid input, please input the hourly rate of employee number "<< Counter2<<endl;
cin>>Rate[Counter];
}
Counter++, Counter2++ ;
}
};
void calc_Overtime(const int Row, double Hours[], double OverTime[])//function calculates overtime
{
int Counter=0;
while (Counter < Row)
{
OverTime[Counter]= Hours[Counter]-40;
}
Counter++;
}
void calc_Gross(const int Row, double OverTime[], double Rate[],double Gross[])//function calculates Gross
{
int Counter=0;
while (Counter<Row)
{
Gross[Counter]= 40*Rate[Counter]+ Rate[Counter]*1.5*OverTime[Counter];
}
Counter++;
}
void calc_Fed(const int Row, double Fed[], double Gross[]) //function calculates Fed tax
{
int Counter=0;
while (Counter<Row)
{
Fed[Counter]= .05*Gross[Counter];
}
Counter++;
}
void calc_State(const int Row, double State[], double Gross[])//function calculates state tax
{
int Counter=0;
while (Counter<Row)
{
State[Counter]= .15*Gross[Counter] ;
}
Counter++;
}
void calc_Union(const int Row, double Union[], double Gross[])//function calculates Union fees
{
int Counter=0;
while(Counter<Row)
{
Union[Counter]= .02*Gross[Counter] ;
}
Counter++;
}
void calc_Net(const int Row,double Fed[],double Union[],double Net[], double State[], double Gross[])//function calculates Net
{
int Counter=0;
while (Counter<Row)
{
Net[Counter]= Gross[Counter]- State[Counter]-Union[Counter]-Fed[Counter];
}
Counter++;
}
void output(const int Row, const int Column, stringF F_name[], stringL L_name[], stringID ID[] ,double Hours[],double Rate[],double Fed[],double Union[],double Net[],double State[], double Gross[],double OverTime[])//function prints output to .txt file
{
cout<<" Company A B C" <<endl;
cout<<" = = = = = = = = " <<endl;
cout<<" pay Roll System" <<endl;
cout<<"================================================================================================================================================================================================================================"<<endl;
cout<< setw(15)<<" First name"<<setw(15)<<"Last name"<<setw(15)<<"Id#"<<setw(15)<<"Rate/h"<<setw(15)<<"OT hours"<<setw(15)<<"Gross"<<setw(15)<<"State Tax"<<setw(15)<<"Federal Tax"<<setw(15)<<"Union fees"<<setw(15)<<"Net"<<endl;
cout<< setw(15)<<" =============="<<setw(15)<<"=============="<<setw(15)<<"=============="<<setw(15)<<"=============="<<setw(15)<<"=============="<<setw(15)<<"=============="<<setw(15)<<"=============="<<setw(15)<<"=============="<<setw(15)<<"=============="<<setw(15)<<"=============="<<endl;
while (Counter<Row)
{
cout<<setw(15)<<F_name[Counter]<<setw(15)<<L_name[Counter]<< setw(15)<<ID[Counter]<<setw(15)<<Rate[Counter]<<setw(15)<<OverTime[Counter]<<setw(15)<<Gross[Counter]<<setw(15)<<State[Counter]<<setw(15)<<Fed[Counter]<<setw(15)<<Union[Counter]<<setw(15)<<Net[Counter]<<endl;
Counter++;
}}
I'm getting
"[Linker error] undefined reference to `calc_Overtime(int const&, double*, double*)' " for every function.
What am I doing wrong? please help I need to hand this in in 3 hours!!!!!!
//declaration
void calc_Overtime(constint&, double Hours[],double Overime[]);
//definition
void calc_Overtime(constint Row, double Hours[], double OverTime[])
//Spot the difference
//Hint: this is two completely different functions