Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hash Tables using vectors

Status
Not open for further replies.

CSJedi

Programmer
Apr 3, 2001
2
0
0
US
I am trying to create a hash table using the STL vector and list (for collisions) and Microsoft Visual C++ will not let me declare the following:

vector<list<string> > hashTable(251);

but will allow

vector<list<int> > hashTable(251);

I have tried to include string and also to typedef the string as char[20] but neither will work. Is there a way to declare such a vector?
 
The problem is what it take too much memory. All the tables will be truncated (if you push too much information or strings are too large). John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top