#include #include #include #include #include #include void quickSort (apvector &list, int first, int last); void swap(apvector &list,int g, int h); struct info { apstring firstname; apstring lastname; apstring email; apstring areacode; apstring phone; }; void main() { apstring path; cout<<"what is the path name in which the file is stored..?"<>path; const char *cstring; cstring = path.c_str(); apstring helo; int counter; int length; ifstream infile; infile.open (cstring,ios::in); if (infile.fail()) cerr<<"did not open corectly"<>length; apvector friends(length); for(int j=0;j>friends[j]; for(int loop=0; loop>choice; switch (choice) { case 1: cout<<"what is the last name of the person who you are looking for?"; cin>>lastname; LNserch(lastname,)./. } void quickSort (apvector &list, int first, int last) { int g = first, h = last; // Set index values 'g' and 'h' to 'first' and 'last' int midIndex; // Create a middle index value apstring dividingValue; // Create a comparison value midIndex = (first + last) / 2; // Set the midIndex value to the middle index of the array portion dividingValue = list[midIndex]; // Set the comparison value equal to the middle of the array do { while (list[g] < dividingValue) g++; while (list[h] > dividingValue) h--; if (g <= h) { swap(list,g,h); g++; h--; } } while (g < h); if (h > first) quickSort (list,first,h); if (g < last) quickSort (list,g,last); } void swap(apvector &list,int g, int h) { apvector temp(2); temp[1]=list[g]; list[g]=list[h]; list[h]=temp[1]; }