Hi I'm still quite new to c++ and I'm trying to create a linked list with a few functions, the first one is to add people to the list and the second one is the print the list and I've gotten them to work properly. It's the third one that is not functioning correctly.
When I put in a few names into the list and print them it works as intended, but when I remove the nodes and then put in new nodes and try to print I get a trying to read / write protected memory error with VS 2010. I'm doing all this during run time.
I bet the problem is that I still have something pointing to the old list still but I can't seem to see what is wrong with my current code. Please look it through and see if you can find what I've done wrong.
The program crashes after I've put something in and then call the remove_all() function followed up by the printList() function.