cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Hash Table Question
Hash Table Question
Jul 16, 2013 at 4:16am UTC
tp11
(4)
I'm trying to create a hash table, but for some reason its not working. Maybe it has some logic error. I'm trying to do linear probing.
Last edited on
Jul 17, 2013 at 6:12pm UTC
Jul 16, 2013 at 6:21am UTC
Daleth
(1030)
What does your
hash(
const
string&)
look like?
Jul 16, 2013 at 6:24am UTC
MatthewRock
(481)
I guess this code should show you some error. You have only one return statement(return -1), which is positioned in "if...else". If status[probe] == 0, then your function won't return anything at all, which means it will return trash, afaik.
Last edited on
Jul 16, 2013 at 10:16am UTC
Topic archived. No new replies allowed.