Hi. Te problem asks for me to read 10 names from a file, put them in a single linked list and sort them. This is what I've done so far.......is it ok?
Cheers!
#include<iostream>
#include<string>
#include<fstream>
using namespace std;
Yes I do have a sorting program that sorts integers from least to greatest, and you can just change all the ints to strings in order to make it into alphabetical order for words. I will send you this program when I get home and you could take a look at the algorithm I used.
This program sorts numbers in an array from least to greatest. If you want to read the names from a file and put them into a dynamic array, you have to use the fstream library, and for the dynamic array you need to use pointer references which you can look up.