how do you make a hashtable store records
Feb 23, 2012 at 9:40pm
If you have
1 2 3 4 5 6 7 8
|
#include "StdAfx.h"
#include <string>
struct record {
int idNumber;
std::string firstName;
std::string surname;
int GPA;
};
|
and
1 2 3 4
|
int HashTable::Hash(void)
{
return (idNum % MAX_ITEMS);
}
|
you're mismatching the variable names. Anywhere that you mean to use idNumber, you have to put idNumber.
Feb 23, 2012 at 10:54pm
yes I understand that. the code that has idNum is the orignal code that hasn't been changed. I tried changing them to idNumber but I got errors
Feb 25, 2012 at 2:37pm
solved
Last edited on Mar 1, 2012 at 7:57pm
Topic archived. No new replies allowed.