Program crashes when running Delete function in doubly linked list

Here is my code.

The thing is, when I try to run the deletel(int item) function, my execution crashes unless the value is set to obj.deletel(1);. Does anyone know why that is?
Thanks for the help guys <3 :)

Also the value it takes in is the ith node. So im deleted the 5th node, or the 2nd node. So the function takes in which node you want to delete, such as 1st, or 2nd. I hope you understand what I'm trying to say here.
Last edited on
Topic archived. No new replies allowed.