Question: mplement your own Stack class. Make it a templated class. Use a vector as the underlying data store. Implement the following functions: push(T val) pop()
mplement your own Stack class. Make it a templated class. Use a vector as the underlying data store. Implement the following functions:
push(T val)
pop()
top()
size()
empty()
Test your implementation with a program that uses all the functions. Make sure your push() and pop() functions work correctly. Hint: You can use some of the vector functions to implement size() and empty().
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
