My code (below) is supposed to read in a list of numbers and names from a file.
ex)
2942893
Bill Scott
Jones
3823920578
Mark Thomas
Sorensen
2931093489
John
Hansen
Then it is supposed to put them into this format (alphabetized by last name and with hyphens added into the numbers).
ex)
Hansen, John 293-109-3489
Jones, Bill Scott 294-2893
Sorensen, Mark Thomas 382-392-0578
So far, I can read in the names and numbers. All I have to do is use selectionSort and add hyphens. How do I do this? Also, when I cout everything I have a bunch of commas after that keep going down the list as if there were still more names and numbers. Thanks for any help.