#include #include struct Node{ char Value[11]; Node *link; }; class LinkedList{ public: // constructors LinkedList(); // accessors void List(); void Insert(char theValue[]); void Delete(char theValue[]); private: Node *head; }; int main() { LinkedList theList; theList.Insert("ABCDE"); theList.Insert("XYZZY"); theList.Insert("BCDEF"); theList.List(); cout << "Hello, world!" << endl; return 0; } LinkedList::LinkedList() { head = new Node; strcpy(head -> Value, "ZZZZZZZZZZ"); head -> link = head; return; } void LinkedList::List() { Node *lead; lead = head -> link; while (strcmp(lead->Value, "ZZZZZZZZZZ") != 0) { cout << lead->Value << endl; lead = lead -> link; } return; } void LinkedList::Insert(char theValue[]) { Node *lead, *follow, *NewNode; lead = head -> link; follow = head; while (strcmp(lead->Value, theValue) < 0) { follow = lead; lead = lead -> link; } NewNode = new Node; strcpy(NewNode->Value,theValue); NewNode -> link = lead; follow -> link = NewNode; return; } void LinkedList::Delete(char theValue[]) { return; }