Help With Sorting Char Arrays Using Pointers
I have a program that I had to add three functions two. One was to insert a new node, one was to delete a node, and the last needs to sort them alphabetically. I'm having all sorts of problems getting them to sort.
I've done great in my programming classes until now. Pointers are really different, but I'm sure I will get them down.
Code:
struct Node;
typedef Node *Node_ptr;
struct Node
{
char word[MAX_WORD_LENGTH];
Node_ptr ptr_to_next_node;
};
The code prompts the user to enter a word, which is stored in the char array. The user can keep entering words, which are stored in sequential nodes, until they enter the sentinel ".".
Thanks for the help!