19 floatStack = intStack;
20 std::cout << floatStack.
top() << std::endl;
22 std::cout << floatStack.
top() << std::endl;
24 std::cout << floatStack.
top() << std::endl;
26 }
catch (std::exception
const& ex) {
27 std::cerr <<
"Exception: " << ex.what() << std::endl;
33 std::cout << vStack.
top() << 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).