how do you make a hashtable store records

Pages: 12
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.
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
solved
Last edited on
Topic archived. No new replies allowed.
Pages: 12