#ifndef NAMES #define NAMES #include #include struct NameT{ std::string first, middle, last, title, suffix; }; const std::string NAME_ERROR = "Error: NO NAME FOUND"; // This takes a csv line in the form first,middle,last, title, suffix // and stores it in a NameT. // // Mostly for File input. NameT CSVToNameT(std::string line); // Takes a NameT and returns a CSV line // first,middle,last,title,suffix std::string NameTToCSV(const NameT & name); // returns a name in the form // title first mddle last suffix // any missing fields are just blank std::string FormatNameT(const NameT & name); // cmpares a name // first key: last name // second key: first name // third key: middle name // // returns true if all three match for stable sorting bool NameTLess(const NameT & a, const NameT & b); #endif