Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

0
Need some help printing my hash table.
Post Flair (click to view more posts with a particular flair)
Post Body

I'm working on creating an open chaining table, each item is a linked list. I have the following code excerpt to create the list

list<string> hashTab[211];
...
...
while(getline(inFile, inputStr)){
    //calculate the hash value of the input string, 
    //the result will be the index

    hashVal = BPHash(inputStr);
    //add input string to the hash tab at the index

    hashTab[hashVal % 211].push_back(inputStr);
    numElements  ;
}

First of all, I hope that the code is correct, it compiles and reads from the data file. But how do I go about printing the contents of this list? I've tried to use a simple cout << hashTab[i], but this won't work.

Author
User Disabled
Account Strength
0%
Disabled 1 year ago
Account Age
2 years
Verified Email
Yes
Verified Flair
No
Total Karma
688
Link Karma
505
Comment Karma
183
Profile updated: 22 hours ago
Posts updated: 1 year ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
2 years ago