need a word to output in an outfile

In this one program that i need to write for class, i need to take either 1 or 0 and have it turn into yes or no respectively.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

	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)
Topic archived. No new replies allowed.