Constructors in C++
Why I face this Error, Again and again, I tried to solve out but I didn't is anyone help me with this:------ #include<iostream> #include<string.h> #include<conio.h> using namespace std; class employees{ private: int emp_no; char emp_name[20]; char emp_address[30]; int no_of_dependents; public: employees(){emp_no=no_of_dependents=0;strcpy(emp_name,0);strcpy(emp_address,0);} void setEmp_no(int t){emp_no=t; } void setEmp_name(string a){a=emp_name; } void setEmp_address(string a){a=emp_address; } void setNo_of_dependents(int s){no_of_dependents=s; } void input(){cin>>emp_no>>emp_name>>emp_address>>no_of_dependents; } void getEmployee_no(){emp_no;} string getEmployee_name(){return emp_name;} string getEmployee_address(){return emp_address;} void getNo_of_dependents(){no_of_dependents;} void display(){cout<<emp_no<<emp_name<<emp_address<<no_of_dependents;} }; int main() { employees empno,ename[20],eadd[30],nod; empno.input(); ename.input(); eadd.input(); nod.input(); empno.display(); ename.display(); eadd.display(); nod.display(); getch(); }