hie guys
I am creaating a program employee data base its a simple c++ program tht should allow a user to input employee details view search edit and delete......now the prblem am having is i want to creat a function that will give an employee a num when entered i am getting an error message on this line
void Employeez::setEmployNum(int en){
empnum(0,"","",0.0);
empnum = en;
the code for the employee template is as follows......
#include "EMPLOYEE.h"
Employeez::Employeez(int empnum,string fName, string lName, double mSalary,int wMonths)
{
setEmployNum(empnum);
setFirstname(fName);
setLastname(lName);
setMonthlySalary(mSalary);
setWorkMonths(wMonths);
}
Employeez::Employeez(){
}
Employeez::~Employeez() {
}
void Employeez::setEmployNum(int en){
empnum(0,"","",0.0);
empnum = en;
}
int Employeez::getEmployNum(){
return empnum;
}
void Employeez::setFirstname(string fName){
FirstName = fName;
}
string Employeez::getFirstname(){
return FirstName;
}
void Employeez::setLastname(string lName){
LastName = lName;
}
string Employeez::getLastname(){
return LastName;
}
void Employeez::setMonthlySalary(double mSalary){
if (mSalary<0)
mSalary=0;
MonthlySalary = mSalary;
}
double Employeez::getMonthlySalary(){
return MonthlySalary;
}
void Employeez::setWorkMonths(int wom){
wMonths = wom;
}
int Employeez::getWorkMonths(){
return wMonths;
}
void Employeez::print() {
cout << ": \nFirst Name: "<< getFirstname() <<endl;
cout << "Last Name: "<< getLastname() <<endl;
cout << "Salary: " << getMonthlySalary() << endl;
cout<<"Worked Months:"<<getWorkMonths()<<endl;
cout << " " << endl;
}