#include #include #include struct person { string fname, lname; // object's variables are MEMBERS. int ssn, bd; // object's functions are called METHODS void print() { cout << fname << " " << lname << ", SSN=" << ssn << ", born " << bd << "\n"; } }; person * read_data() { ifstream in("/home/www/class/een118/labs/database1.txt"); if (in.fail()) { cerr << "No file\n"; exit(1); } person * array = new person[1010]; // 1010 person objects were just created. The default // constructor was called 1010 times. int num = 0; while (num < 1010) { int a, b; string c, d; in >> a >> c >> d >> b; // The file contains ssn fname lname bd if (in.fail()) break; array[num].fname = c; array[num].lname = d; array[num].ssn = a; array[num].bd = b; num += 1; } in.close(); return array; } person find_oldest(person * data, int size) { int oldest = data[0].bd, oldestpos = 0; for (int i=1; i