Hi All,
Since I posted the previous message, I made some experiments. First, I
changed the employee from struct to class:
From
struct employee
{
int id;
std::string name;
int age;
employee(int id_,std::string name_,int
age_):id(id_),name(name_),age(age_){}
friend std::ostream& operator<<(std::ostream& os,const employee& e)
{
os<
employee_set;
So, I had to change the scope of index class members to public, and it
worked:
class employee
{
public:
int id;
std::string name;
int age;
employee(int id_,std::string name_,int
age_):id(id_),name(name_),age(age_){}
friend std::ostream& operator<<(std::ostream& os,const employee& e)
{
os<