What exaclty are you trying to do? Does the user input numbers and operations? If so, you need to parse the string and determine how to calculate the answer. The best approach I have seen uses 2 stacks, one for the numbers and one for the opperations. Just push em on and pop em off to do your calcuations. Also, keep in mind the order of operations... you MAY need to do a double pop on the op stack
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.