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:

C++ Hash Table Problem: ONLY USE STANDARD LIBRARY, IOSTREAM, VECTOR, and STRING

Code Runner Error Message:

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

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

text file that are stored in a hash table. The main program

Header File:

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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!