I haven't finished the code completely yet. But as far as the code is done, can anyone clear the errors in this??
please do clear them as soon as possible.
Thanks in Advance!!
1 #include<iostream.h>
2 #include<conio.h>
3 #include<stdio.h>
4 #include<stdlib.h>
5 #include<math.h>
6 int en;
7 char empname[20];
8 char empdesig[30];
9 int yj;
10 int basal;
11 char qual[50];
12 int dob;
13 int age;
14 int cne();
15 int edit();
16 int sae();
17 int mse();
18 int dis();
19 struct empdet
20 {
21 int en;
22 char empname[20];
23 char empdesig[30];
24 int yj;
25 int basal;
26 char qual[50];
27 int dob;
28 int age;
29 }worker;
30 int main()
31 {
32 char choice;
33 do
34 {
35 int n;
36 cout<<"**********************************\n";
37 cout<<"--EMPLOYMENT MANAGEMENT SYSTEM--\n";
38 cout<<"***********************************\n";
39 cout<<"1.Create New Employee details\n";
40 cout<<"2.Edit an employee\n";
41 cout<<"3.Search an employee\n";
42 cout<<"4.Monthly Salary of an employee\n";
43 cout<<"5.display\n";
44 cout<<"6.Exit\n";
45 cin>>n;
46 switch(n)
47 {
48 case 1: cne();
49 break;
50 case 2: edit();
51 break;
52 case 3: sae();
53 break;
54 case 4: mse();
55 break;
56 case 5: dis();
57 break;
58 case 6:exit(0);
59 break;
60 default:
61 cout<<"Invalid input! Get lost!!";
62 }
63 cout<<"\n Do you want to continue:(Y or N)";
64 cout<<"\n enter your choice:";
65 cin>>choice;
66 if(choice=='y'||choice=='Y');
67 {
68 cout<<"Again enter choice:";
69 }
70 }while(choice=='y'||choice=='Y');
71 return 0;
72 }
73 int cne();
74 {
75 cout<<"Enter the Employee no:";
76 cin>>worker.en;
77 cout<<"Enter the Employee Name:";
78 cin>>worker.empname;
79 cout<<"Enter Employee Designation:";
80 cin>>worker.empdesig;
81 cout<<"Enter the year joined:";
82 cin>>worker.yj;
83 cout<<"Enter Employee's Qualification:";
84 cin>>worker.qual;
85 cout<<"Enter Date of Birth:";
86 cin>>worker.dob;
87 cout<<"Enter Employee's Age:";
88 cin>>worker.age;
89 return 0;
90 }
91 int edit();
92 {
93 cout<<"under construction";
94 return 0;
95 }
96 int sae();
97 {
98 cout<<"wait for some time";
99 return 0;
100 }
101 int mse();
102 {
103 cout<<"wait!";
104 return 0;
105 }
106 int dis();
107 {
108 cout<<"Employee no:";
109 cout<<worker.en;
110 cout<<"Employee Name:";
111 cout<<worker.empname;
112 cout<<"Employee Designation:";
113 cout<<worker.empdesig;
114 cout<<"year joined:";
115 cout<<worker.yj;
116 cout<<"Employee's Qualification:";
117 cout<<worker.qual;
118 cout<<"Date of Birth:";
119 cout<<worker.dob;
120 cout<<"Employee's Age:";
121 cout<<worker.age;
122 return 0;
123 }
124 return 0;
125 }
ohh..sorry about it. My program is about employee management system.
And it has the following errors:
.
[Error]cpp:74: error: expected unqualified-id before '{' token
[Error] cpp:92: error: expected unqualified-id before '{' token
[Error] cpp:97: error: expected unqualified-id before '{' token
[Error]cpp:102: error: expected unqualified-id before '{' token
[Error]cpp:107: error: expected unqualified-id before '{' token
[Error]cpp:124: error: expected unqualified-id before "return"
[Error]cpp:125: error: expected declaration before '}' token