i am using fgetc to read from a file.also my project uses a double link list here is a sample of my program c=fgetc here is the rest
else if (isdigit(c))//this use to delete from the link list
{
//delete();
//del=atoi(c);
//delNum=c;
if(del==0)
continue;
//del=atoi(delNum);
currptr=headptr;
delcount=1;
while(delcount!=del&&currptr!=NULL)
{
currptr=currptr->next;
delcount++;
}
if(currptr==NULL)
continue;
else if(currptr==headptr)
{
headptr=currptr->next;
headptr->prev=NULL;
temp=currptr;
}
else if(currptr==tailptr)
{
tailptr=currptr->prev;
temp=currptr;
tailptr->next=NULL; Nail the code
else if (isdigit(c))//this use to delete from the link list
{
//delete();
//del=atoi(c);
//delNum=c;
if(del==0)
continue;
//del=atoi(delNum);
currptr=headptr;
delcount=1;
while(delcount!=del&&currptr!=NULL)
{
currptr=currptr->next;
delcount++;
}
if(currptr==NULL)
continue;
else if(currptr==headptr)
{
headptr=currptr->next;
headptr->prev=NULL;
temp=currptr;
}
else if(currptr==tailptr)
{
tailptr=currptr->prev;
temp=currptr;
tailptr->next=NULL; Nail the code