Pointers and Linked Lists -- Completely lost

User will put in two words: the chars in each word will be loaded into a sorted Linked List. Use a struct conaining data of the char variable "letter" and int variable "occurences" plus the pointer to the next element of the list. Letters can be used more than once in the word but appearr only onvce in the list with the occurences field updated. Once the lists are created, use the overloaded operater + to combing the lists together into one list. Comments in code are helpful

Use the following 'Main' to test:

sortedListNode list1;

sortedListNode list2;

sortedListNodelist3;

cout << "Enter the first word: " ;

cin >> word1;

cout << "Enter the second word: ";

cin >> word2;

list1 = fromString(word1); //word one to list

cout << "Letter list from word one: " << endl;

prntList(list1); //print list from word one

list2 = fromString(word2); //word 2 to list

cout << "Letter list from word 2: " << endl;

prntList(list2); //printlist from word 2

list3 = list1 + list2;

cout << "Letter list from both words: ";

prntList(list3);

I have been trying to learn how to use linked lists and I cannot figure out how to approach this program solution. Just trying to learn cpp, help is appreciated!
Topic archived. No new replies allowed.