What is easiest way to calculate an infix expression using C language?
问题 Suppose the user inputs an infix expression as a string? What could be the easiest ( By easiest I mean the shortes t) way to evaluate the result of that expression using C language? Probable ways are converting it to a postfix then by using stacks.But its rather a long process. Is there any way of using functions such as atoi() or eval() that could make the job easier? 回答1: Certainly the most instructive way (and possibly even the easiest, once you know how) is to learn how to write your own