I'm really having trouble spotting where my seg fault might be and I know a fresh set of eyes will help. Basically
start_ptr
is the head pointer and
start
is initialized to 0 and
end
is initialized to the number of nodes in the list. here's the code
node *curent = start_ptr;
int mid;
int i;
mid = (start+end)/2;
for (i=0; i < mid; i++)
{
current = current->nxt;
}
if (current->emp.ID == key)
printOne(current);
else
if (current->emp.ID < key)
search (mid + 1, end , key);
else
search (start, mid - 1, key);
any idea where might my seg fault might be coming from? please help asap.