Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stack clearing problem.

 
Adam Ellsworth
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Adam Ellsworth
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nevermind, just tried stack.clear(); and that worked, ugh, lol.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic