-
October 1st, 2012, 01:50 PM
#16
Re: A task involving linked lists and a headache
I didn't try and compile and run your code, but a quick check still shows this problem that I mentioned previously.
Code:
if(Head==NULL)
{
InList->Cur=NewBunny;
InList->Next=Head; This is wrong
As to what's wrong with your loop, each time you delete a node, your list gets smaller. Your loop variable i doesn't account for that. You really shouldn't be forcing array constructs onto a list anyway.
Did you try debugging yet?
Last edited by GCDEF; October 1st, 2012 at 01:53 PM.
Tags for this Thread
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
|