/****************************************************************************************** split.cpp Print a whole bunch of statistical information on the list ******************************************************************************************/ #include <iostream> #include <string> #include <fstream> using namespace std; #include "person.h" // MAIN! void main() { int count=0; const int maxsize=100; person people[maxsize]; string filename; cout << "Enter the file to read: "; cin >> filename; readFile(filename, people, maxsize, count); cout << "The oldest person is " << people[indexOfOldest(people, count)].age << endl; cout << "The youngest person is " << people[indexOfYoungest(people, count)].age << endl; int average = AverageAge(people, count); cout << "The average age is " << average << endl; showYoungerThan(people, count, average); showOlderThan(people, count, average); }