Look at function Stack::pop(STACKTYPE &data)
It takes a non-const reference argument in which it stores the element being removed (this actually happens in the implementation of List::removeFromFront(NODETYPE &value)
).
That means that you can pass a char
to the pop()
function and afterwards it will contain the data you're looking for.