Re: help with C
- From: "sulays" <sscheell2000@xxxxxxxxx>
- Date: 20 Nov 2005 10:06:05 -0800
like this? I dont know what you want i need hel with the inserting, is
only for last name for now but I need first name and mid ini and id
now i'm getting the first input to print but it stop
int main()
{
List list;
List temp;
while(!feof(fpA))
{
readingaemployeedata(fpA);
if(feof(fpA))
break;
temp = creatingaemployeedata();
while(temp != NULL)
{
list = inserting(list,temp);
printing(list);
}
setptrzero(list);
return 0;
}
}
List* inserting(EIS *list,EIS *temp)
{
List *prev = NULL;
List *curr = NULL;
if(list == NULL)
{
return temp;
}
else
{
curr = prev = list;
temp->next = curr;
while(curr != NULL)
{
if(strcmp(temp->lastname,curr->lastname) > ZEROI)
{
if(curr == prev)
return temp;
else
prev->next = temp;
return list;
}
else
{
prev = curr;
curr = curr->next;
}
}
prev->next = temp;
return list;
}
}
.
- Follow-Ups:
- Re: help with C
- From: Richard Heathfield
- Re: help with C
- References:
- help with C
- From: sulays
- Re: help with C
- From: Nick Keighley
- Re: help with C
- From: sulays
- Re: help with C
- From: sulays
- Re: help with C
- From: pete
- Re: help with C
- From: sulays
- Re: help with C
- From: Nick Keighley
- help with C
- Prev by Date: Re: help with C
- Next by Date: Re: Precedence of Logical Operators
- Previous by thread: Re: help with C
- Next by thread: Re: help with C
- Index(es):
Relevant Pages
|