says I need a ")" when i already have one ?

(11) error: expected `)' before ';' token
(11) error: expected primary-expression before ')' token
(11) error: expected `;' before ')' token
(27) error: expected `)' before ';' token
(27 error: expected `;' before ')' token
(27) error: expected primary-expression before ')' token

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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
  #include <iostream>
#include <iomanip>
#include <string>
using namespace std;
#include "Employeeinfo.h"
#define DUMMYVALUE -99.0;
int main()
{
EmployeeInfo employee;
double grosspay, tax, netpay, totalgp=0, totaltax=0, totalhours=0, count=0;
if (employee.id != DUMMYVALUE)
{
	cin  >>  employee.id;  
	>> employee.firstname  >>  employee.lastname;
	>>employee.birthday.month;
	>>employee.birthday.day;
	>>employee.birthday.year;
	>>employee.datehired.month;
	>>employee.datehired.day;
	>>employee.datehired.year;
	>>employee.payrate;
}


while(count < 5)
{
	if(employee.hours != DUMMYVALUE)
	{
		totalhours+=employee.hours;
		cin >> employee.hours;
	}
	count++;
}


grosspay = totalhours*employee.payrate;
if(grosspay>= 1000)
	tax = .20*grosspay;
else if(grosspay>=800 && grosspay<1000)
	tax = .18*grosspay;
else if(grosspay>=600 && grosspay<800)
	tax = .15*grosspay;
else
	tax = .10*grosspay;
netpay = grosspay - tax;
totalgp+= grosspay;
totaltax+= tax;
cout << "Name: "  << employee.lastname + "," + employee.firstname << endl;
       cout <<"ID : "<<employee.id << endl;
       
       cout << "DOB: "<<employee.birthday.month << "/"
		     <<employee.birthday.day << "/"
		     <<employee.birthday.year << endl;
       cout << "BOH: "<<employee.datehired.month << "/"
		      <<employee.datehired.day << "/"
		      <<employee.datehired.year << endl;
       cout <<"Hours:  "<<totalhours << endl;
       cout <<"Pay Rate: $"<<employee.payrate << endl;
       cout <<"Gross Pay: $"<<grosspay << endl; 
       cout <<"Tax: $"<<tax << endl;
       cout <<"Netpay: $"<<netpay << endl;
       cout <<"Total gross pay: $"<<totalgp<<endl;
       cout << "Total tax deduction: $" <<totaltax<<endl;
       cout << endl << endl;  
cout<< "Total grosspay =$"<<totalgp<<endl;
cout<<"Total tax=$"<<totaltax<<endl;
return 0;
}
Last edited on
#define DUMMYVALUE -99.0;
You do not place ; on #define lines.
You have a semicolon after your definition of DUMMYVALUE

you also have semicolons after each line of your cin grouping (you either need to remove the extra ;s or add a cin before each line)
Topic archived. No new replies allowed.