Hi, I am not able to destroy a hash table. I have put the destroy function below:
void desTable(ListNode* v[10])
{
ListNode* temp;
ListNode* tempNext;
for (int i = 0; i < 10; i++)
{
if (NULL != v[10])
{
temp = v[10];
while (NULL != temp)
{
tempNext = temp->next;
delete temp;
temp = tempNext;
}
v[10] = NULL;
}
}
}