Hey, I just finished my first hash table and was wondering if anyone would take a look at it and make comments. It stores three letter strings alphabetically into 26 hash functions, and right now only contains functions to add new string and to print. Let me know if this resembles anything like an actual hash table, I had to self teach myself how to do them since the algorithm book I'm reading only briefly touched upon them assuming the reader already knew about them (which I didn't!), and everything I know about them I gleaned from this book. It does what I want, but just not sure if it resembles what a hash table is supposed to look like
Code:
#include<iostream>
#include<string>
#include<vector>
#include<time.h>
using namespace std;

struct hashLink
{
    hashLink(string s, hashLink* p) : hashString(s), prev(p), next(NULL) {};
    string hashString;
    hashLink* prev;
    hashLink* next;
};

class threeLetterHash
{
public:
    threeLetterHash();
    void print();
    void addString(string);
	
private:
    vector<hashLink*> hashFuncs;
    hashLink* cptr;
};

threeLetterHash::threeLetterHash()
{
    for (int x=0; x<26; x++)
 	hashFuncs.push_back(NULL);
}

void threeLetterHash::addString(string s)
{
    if (hashFuncs[s[0]-'a']==NULL)
	hashFuncs[s[0]-'a']=new hashLink(s,NULL);
    else
    {
	cptr=hashFuncs[s[0]-'a'];
	while (cptr->next!=NULL)
		cptr=cptr->next;
	cptr->next=new hashLink(s,cptr);
    }
}

void threeLetterHash:: print()
{
    for (int x=0; x<26; x++)
    {
	cout<<char(x+97)<<"\t";
	cptr=hashFuncs[x];
	while (cptr!=NULL)
	{
		cout<<cptr->hashString<<"\t";
		cptr=cptr->next;
	}
	cout<<endl;
    }
}

int main()
{
    srand(time(NULL));

    threeLetterHash myHash;
    string newString="   ";

    for (int x=0; x<40; x++)
    {
	for (int y=0; y<3; y++)
		newString[y]=char(rand()%26+97);

	myHash.addString(newString);
    }
	
    myHash.print();
    return 0;
}