I am getting a segmentation fault during the execution of the following code. The program executes the first "for" loop correctly only on the first pass and it crashes while on the second pass (i think). Can anyone help me??
Sorry about the "preedit" version without the code tags. If anyone needs the whole program i would be glad to post it. I really need help with this one guys....
Is nodelist a std::list? If so, e is invalid after the erase() and should not be dereferenced. This is a problem not only immediately, but later when attempting to increment e in the for() statement.
I don't think thats the problem since the first couts after the erase come out fine. After all i'm not actually erasing e but the object on the list that e is pointing at. Right?