Hey guys, I'm writting a program that reads a list of names from a file called name.txt and instert these names directly into a linked list in alphabetical order of last names. For example, if the text file has these names: Henry Johns III, Albert Einstein, Henry Johns II, Mary D Goly, Bob Apple Jr. , Bob Apple Sr. then the linked list will be in this order: Bob Apple Jr. , Bob Apple Sr., Alber Einstein, Mary D Goly, Henry Johns II, Henry Johns III. Someone suggested me to use CompareTo to compare the last names, but I'm still very confused. PLEASE HELP ME, I'M VERY DESPERATE!
All 4 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.