17 doubleStack.
push(7.7);
18 doubleStack = intStack;
19 std::cout << doubleStack.
top() << std::endl;
21 }
catch (std::exception
const& ex) {
22 std::cerr <<
"Exception: " << ex.what() << std::endl;
void pop()
Pop element off the stack.
void push(const T &e)
Pushes element onto stack.
Stack class using vector as element container.
Template function returns maximum.
T top() const
Return top element of the stack (but not pop-ing it).