I'm writing a simple palindrome problem but its giving me a hard time. I'm using stack.empty(); to empty the stack but it is only removing the top element of the stack. Anyone know why it would do this?
P.S. My queue.clear(); works fine.
Thanks in advance.
posted 12 years ago
Nevermind, just tried stack.clear(); and that worked, ugh, lol.