I ran my code, and it runs fine. But when I run my code, my output doesn't look like the screenshot output. My output just displays head = tail = 0 = '#', list a:

I commented out the destructor because as soon as I ran my code, the program crashed.