I have been reviewing some exercises for data structures in c++
I have to remove every other element in a linked list using the STL implementation of a list. When I am traversing the list How do I make sure the iterator won't go passed the end of the list? Because when I do the program crashes. The first time I did this problem it took me 5 minutes, now I am pulling my hair out.