C++ Calculator using Stacks and Queues
问题 I'm trying to understand a topic in class about using stacks and queues as a means of programming a calculator. I understand what infix and postfix expression is but how does it make it easier for a program to evaluate an expression and why are queues and stacks ideal in this situation? Thanks 回答1: It makes the order of operations simpler to handle, for example: + * - 4 2 5 3 Can only mean ((4 - 2) * 5) + 3 Which might be more readable for us, but we need to know the order of operations and