|
-
Feb 22nd, 2003, 11:50 PM
#1
Thread Starter
Fanatic Member
Can anyone tell me why this won't work?
Can anyone please tell me why this
Code:
void InsertNode(NODE *pNode, NODE *pAfter)
{
pNode->pNext = pAfter->pNext;
pNode->pPrev = pAfter;
if (pAfter->pNext != NULL)
pAfter->pNext->pPrev = pNode;
else
pTail = pNode;
pAfter->pNext = pNode;
}
decides it is going to exit the program?
It is supposed to insert pNode into the linked list after pAfter but it is not working, it just exits every single time. grrrr. Any help would be greatly appreciated
-
Feb 23rd, 2003, 10:12 AM
#2
Step through it with a debugger. The code looks ok. Maybe your linked list gets corrupted by some other means.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 1st, 2003, 12:12 AM
#3
Fanatic Member
What does your driver do?
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
|