Created
March 7, 2023 07:32
-
-
Save iarash84/9871ff0d6fd07da16e39f07351321f94 to your computer and use it in GitHub Desktop.
stack temlate usage example
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
Stack<int> intStack(10); | |
intStack.push(5); | |
intStack.push(8); | |
std::cout << intStack.pop() << std::endl; // Output: "8" | |
Stack<std::string> stringStack(5); | |
stringStack.push("hello"); | |
stringStack.push("world"); | |
std::cout << stringStack.pop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment