I've got to code up a homework for school between now and Friday. It's a stack example (using a linked list), so i've got to push and pop and all of that fun stuff to evaluate postfix expressions. The only real problem that I can see is how to get the integers so that they can be evaluated as numbers.
The format for an expression is as follows:
3 45 + .
Now, getting a single character isn't hard, so I push it onto the stack, but when it comes to more than 1 digit number, it pushes each individual digit separately. Then I handle the operator.
Maybe I need to test whether the incoming "character" is a number or an operator and read it as an int or char accordingly?