ifstream infile;
of stream outfile;
inFile.open("fileIn.txt");
outfile.open("fileout.txt")'
double ID, hours, rate, pay, dues;
double unionDues,overTime netPay;
int member;
cout <<"WEEKLY PAYROLL"<< endl;
cout << "ID No. Hours Rate Pay Member Dues Net "<< endl;
while (!InFile.eof())
{
inFile >> ID >> hours >> rate >> member >> endl;
}
//overtime
if(hours > 40)
{
overTime= (hours-40)*1.5*rate;
pay = overTime + 40 * rate;
}
//regular
else
pay = hours * rate;
//union
if(unionStatus==1)
{
unionDues= pay * .10;
}
else
{
unionDues= 5;
}
netPay = pay - unionDues;
outfile << ID << hours << rate << pay << member << dues << pay << endl;
The part i need to have it is in "//union" and have it oufile in the spot of "member" at the end of the program loop.
(this program is a little wacky cause of my version of c++, my school's is updated)