Hello, I am working on an assignment that requires me to sort an a vector of names in alphabetical order using the last name. I don't know how to do that when the names are stored as "first last".
My code for sorting by first name is included for reference.
you need to split the names, either store them as 2 strings, or split off the last name in the sort comparison (woefully inefficient for more than a small # of names).