03-28-2005, 03:40 AM | #1 | ||
College Starter
Join Date: Oct 2000
Location: Calgary
|
c++: seg fault hunting
I'm working on a doubly linked list.
Synopsis: - add item (ok) - remove item by position in list (display shows it's gone) - add item to same location //seg fault OR - add item (ok) - remove item by position in list (display shows it's gone) - add item to different position in list (ok) - remove item by position in list //it still accesses the location of the first item - seg fault I've traced a bunch but since it works in some situations, I can't see what's wrong. Here are the problematic functions: Code:
Code:
Code:
Code:
Although the search function may not be sleek, I don't think the problem is there because another function not included uses it successfully. If I run the program without remove, I never get a seg fault. |
||
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|