1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
ifstream& operator >> (ifstream& ifile, Employee*& ptr)
{
ifile >> ptr->idNum;
ifile.ignore(1000, '\n');
getline(ifile, ptr->name);
getline(ifile, ptr->phoneNum);
ifile >> ptr->age;
ifile.ignore(1000, '\n');
ifile.get(ptr->gender);
ifile >> ptr->salary;
ifile.ignore(1000, '\n');
getline(ifile, ptr->jobTitle);
return ifile;
}
ifstream& operator >> (ifstream& ifile, Programmer*& ptr)
{
ifile >> ptr->depNum;
ifile.ignore(1000, '\n');
getline(ifile, ptr->supervisor);
ifile >> ptr->raisePer;
ifile.ignore(1000, '\n');
// Assuming the file reads 0/1 for bool variables
ifile >> ptr->CPP;
ifile.ignore(1000, '\n');
ifile >> ptr->java;
ifile.ignore(1000, '\n');
return ifile;
}
ifstream& operator >> (ifstream& ifile, SoftwareArch*& ptr)
{
ifile >> ptr->depNum;
ifile.ignore(1000, '\n');
ifile >> ptr->raisePer;
ifile.ignore(1000, '\n');
ifile >> ptr->yearsXP;
ifile.ignore(1000, '\n');
return ifile;
}
|