|
-
October 22nd, 2004, 12:34 AM
#1
deleting apart of a linked list
I have the same problem i am trying to delete a part of a linked list I have the code
Code:
void deleteitem(struct list *fly)
{
int deletenumber;
int count=0;
scanf("%i", &deletenumber);
goto_head(fly);
for(count = 0 ; count == deletenumber ; count ++)
{
goto_next(fly);
}
delete(fly);
}
and I don't know how to delete an item out of the linked list at the location deletenumber, this code keeps taking the first part out can some one tell me what i need to fix it.
-
October 22nd, 2004, 05:24 AM
#2
Re: deleting apart of a linked list
 Originally Posted by Robbo99
void deleteitem(struct list *fly)
{
...
for(count = 0 ; count == deletenumber ; count ++)
May be count!=deletenumber ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|