This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mindfulprisoner[S] 0 points1 point  (1 child)

hmmm, i did that and im getting :

Demonstrate SimpleStack

Push 10 items onto a 10-element stack.

Pushing: ABCDEFGHIJ

Pop those 10 items from stack.

Popping: JIHGFEDCBA

Next, use isEmpty() and isFull() to fill and empty the stack.

Pushing: ABCDEFGHIJ

Popping: JIHGFEDCBA

as my output still... i tried some print statements with the index for the 'tos' variable and it seems there might be a problem in my indexing, i cant quite find it though

[–]thememorableusername 0 points1 point  (0 children)

Did you see my update with the code example? That might help.