Hello,
I'm having problems with making a class which includes one data type of string. However if i change it from string to character it works fine.Here's the code:
Header file:
#include<string>
class employe {
private:
std::string name;
int age;
int empno;
int fonno;
int salary;
public:
employe();
employe(string n, int a, int e, int f, int s);
employe(const employe&emp);
void setname(string n);
void setage(int a);
void setempno(int e);
void setfonno(int f);
void setsalary(int s);
string getname();
int getage();
int getempno();
int getfonno();
int getsalary();
void displayemployeinfo();
};
#include<string>
class employe {
private:
std::string name;
int age;
int empno;
int fonno;
int salary;
public:
employe();
employe(std::string n, int a, int e, int f, int s);
employe(const employe&emp);
void setname(std::string n);
void setage(int a);
void setempno(int e);
void setfonno(int f);
void setsalary(int s);
std::string getname();
int getage();
int getempno();
int getfonno();
int getsalary();
void displayemployeinfo();
};