Need help with evaluating prefix exprs using queue
Could you please take a look at the following code and tell me where I went wrong? :crazy: I'm trying to write a program that evaluates a prefix expression using a queue. Below is the function that takes two chars and an operator and performs calculation. The problem here is that when add(divide, multiply, or subtract) two integers, I get a nice int result, but the I have to convert that int back into char in order to store it in a queue. What a mess! I think I'm doing something stupid here, but please take a look!
|All times are GMT +5.5. The time now is 00:09.|