could anyone clear the errors in this code?

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 }
Last edited on
closed account (48T7M4Gy)
C'mon Ashwin,

What happened to code tags and a summary of the errors? <> at the toolbox on the right.

Regrettably, the mindreader team is away on a training exercise at the moment. It's called "Instant Debugging by Telepathy".

What's your program supposed to do and what is it doing to draw you the conclusion that u have error(s)?

Thanks in Reverse!!
:)
Last edited on
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

Hope you will be able to solve it now.
closed account (48T7M4Gy)
int cne();

I don't think u meant to have a ; at the end of that line Ashwin.

Where are your code tags. Programs appear in purple text boxes and are supposed to be properly indented. :)
closed account (48T7M4Gy)
You have the same problem with your colon at each of the 'int xyz()' lines, namely at the function definitions.

Also your lines 124 and 125 are a problem. You only have to tell the computer once. :)
Last edited on
Well, Thank u! my program is working!
Topic archived. No new replies allowed.