Skip to content

Instantly share code, notes, and snippets.

@iarash84
Created March 7, 2023 07:32
Show Gist options
  • Save iarash84/9871ff0d6fd07da16e39f07351321f94 to your computer and use it in GitHub Desktop.
Save iarash84/9871ff0d6fd07da16e39f07351321f94 to your computer and use it in GitHub Desktop.
stack temlate usage example
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