Linked List Nodes Copy Constructor

I've been experimenting trying to create three different stacks and do functions for those individually.
The point is to use pointers and no stl containers.
So I would pop off a certain character that was last and delete every other same character in the stack.
My problem is that after I manage to get multiPop to work, stack A is also affected so when I test it, the assert throws.
( the list is bbc instead of a b a b c a)
Stack C doesn't work at all when I uncomment the first assert for it. Compiler crashes. ( I use codeblock )

(erased the code because this is schoolwork)
Last edited on
stackA and stackB are pointers which point to the same object.

stackC is a pointer that points to some random place in memory.

Your gratuitous use of pointers is getting you in trouble.
Ooh I mentally head desk.
I am going to start from scratch, trying to keep track of pointers more closely this time. Agh.
Thank you!
Last edited on
Topic archived. No new replies allowed.