void SerEmp(void)
{ clrscr();
int Target,EmpID,Found;
char check,EmpName[40],DOA[9],DOP[9],DOB[9],Mstat;
FILE *mem,*pay;
if((mem=fopen("E:\\Proj\\Member.dat","r"))==NULL)
{ printf("File is Empty!");
sleep(2);
SerEmp();
}
else
{ printf("Please Enter Employee ID to Search : ");
fflush(stdin);
scanf("%i",&Target);
while (!feof(mem))
{ fscanf(mem,"%i %[^/]%*c %[^/]%*c %[^/]%*c %[^/]%*c %c",&EmpID,EmpName,DOA,DOP,DOB,&Mstat);
if(Target==EmpID)
{ printf("Employee ID : %04i\n",EmpID);
printf("Employee Name : %s\n",EmpName);
printf("Date of Appointment : %s\n",DOA);
printf("Date of Probational Period : %s\n",DOP);
printf("Date of Birth : %s\n",DOB);
printf("Maritial Status : %s\n",&Mstat);
sleep(5);
Employeemgt();
}
else if(Target!=EmpID)
{ printf("Record Not Found, please check Employee Id");
// Here is where it occurs......i can't find what i did wrng....pls help....
sleep(2);
Employeemgt();
}
}
}
//getch();
fclose(mem);
//Employeemgt();
}