I\'m trying to create a program that converts an arithmetic expression from infix to postfix form. As long as I don\'t call the \"infixToPostFix\" function, the program runs
stack is implemented using container, since stack is container adaptor, by default deque is used. In probably one line of your code - you call pop/top on empty stack, that is not allowed.
trace show, that error is after Token +.
Problem is here:
else if (token.getType() == OPERATOR)
{
Token topToken = stack.top();
You try to top from empty stack, since stack in case, where is only NUMBER token before OPERATOR token, is empty.