19 std::cout << intStack.
top() << std::endl;
22 std::cout << dblStack.
top() << std::endl;
24 }
catch (std::exception
const& ex) {
25 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.
T top() const
Return top element of the stack (but not pop-ing it).