I have a pointer curr in the function , that goes curr =curr-> next.
This is my add code.
Code:
void add(char *new_string, Node *temp)
{
Node *NewNode;
NewNode = newNode(new_string);
Node *curr;
Node *prev;
curr = temp;
while (curr != NULL)
{
prev = curr;
curr = curr->next;
}
prev->next=NewNode;
return (temp);
}
Code:
Main function
if (List[bucket] == NULL)
{
temp = addhead(string,List[bucket]);
List[bucket]= temp;
}
else
{
temp = add(string,List[bucket]);
List[bucket] = temp;
}
My question is about the function call. Im aware you are making me think with your replies. which is good. So I can solve the problem myself. But your vocabulary is way over my head.
Thanks.