help with code =[

Feb 13, 2015 at 1:21am
Please does anyone know what the problem with my code is, it won't compile =[

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
 #include <iostream>
#include <iomanip>
#include <string>
using namespace std;
struct Date
{ 
    int month;
    int day;
    int year;
};

struct EmployeeInfo
{
int id;
string firstname;
string lastname;
Date birthday;
Date datehired;
double payrate;
int hours;
};

int main()
{
EmployeeInfo employee;
double grosspay, tax, netpay, totalgp=0, totaltax=0, count=0;
   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>>employee.hours;
while (count<10)
{
grosspay = employee.payrate * employee.hours;
if(grosspay>=1000)
tax = .25*grosspay;

else
{
	tax = .18*grosspay;
}
	netpay = grosspay - tax;

count++;
totalgp+= grosspay;
totaltax+= tax;
}
cout<<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 << employee.hours << tax << netpay << totalgp << totaltax<<endl;
return 0; 
}
Feb 13, 2015 at 1:22am
There is no compilation error. The code compiles and can be executed.

Please copy and paste the exact error message(s) you are seeing.
Feb 13, 2015 at 1:32am
i'm compiling this on putty (unix) and it's giving me some errors such as "warning: no new line at end of file IN function 'int main () ': error: expected '}' at end of input... Have you used or know about putty/unix ?
Feb 13, 2015 at 1:37am
putty is a terminal emulator, not a compiler.

Some compilers are picky about having a NL character at the end of the source.
Open the source file and make sure the is a empty blank line after line 46.
Feb 13, 2015 at 6:59pm
@abstractionAnon can you help me with another problem please lol
Feb 14, 2015 at 9:41pm
Can't help if you don't post it.
Feb 15, 2015 at 4:10am
Feb 15, 2015 at 10:35am
stop duplicating threads
Topic archived. No new replies allowed.