Question: C++ Hash Table Problem: ONLY USE STANDARD LIBRARY, IOSTREAM, VECTOR, and STRING LIBRARIES!!! I am getting errors writing a function that prints the top N
C++ Hash Table Problem: ONLY USE STANDARD LIBRARY, IOSTREAM, VECTOR, and STRING LIBRARIES!!!
I am getting errors writing a function that prints the top "N" (number/amount passed into function) of words read in from an E-book text file that are stored in a hash table. The main program reads two text files. One is a section of an E-book and one is a text file with a list of the 50 most commonly used words in the English language. The words from the E-Book are stored into a Hash Table. The printTopN(int n) function needs to print out the top "N" words from the hash table. Here is my code so far:

Code Runner Error Message:


Here is some info about the functions (instructions): IGNORE NUMBER OF COLLISIONS AND NUMBER OF STOP WORD FUNCTIONS

Header File:


void HashTable: :printTopN(int n) wordItem* topNArray[n]; wordItem* current; current - hashTable[i]: while(current != NULL) for(int j =0; j count current->count && topNArray[n + 1]->count current->count) next for(int k=0; k wordcount
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
