-
-
Save ibeauregard/94e40017e60a67945a04c02613ec8a29 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() | |
{ | |
IntStack* stack = IntStackClass.new(); | |
for (int i = 5; i > 0; i--) { | |
stack->_->push(stack, i); | |
} | |
printf("At the top of the stack is `%d`\n\n", stack->_->peek(stack)); | |
while (!stack->_->isEmpty(stack)) { | |
printf("`%d` was popped from the stack\n", stack->_->pop(stack)); | |
} | |
stack->_->delete(&stack); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment