15 stringStack.
push(
"hello");
16 std::cout << stringStack.
top() << std::endl;
18 }
catch (std::exception
const& ex) {
19 std::cerr <<
"Exception: " << ex.what() << std::endl;
void pop()
Pop element off the stack.
Full specialisation of stack class template.
void push(const std::string &s)
Pushes element onto stack.
std::string top() const
Return top element of the stack (but not pop-ing it).
Specialisation for string as element type.