10-29-2011, 06:01 PM
(10-28-2011, 06:22 PM)Phantom K Wrote: nnnngh, I have to write a C++ program that evaluates any prefix expression the user inputs (i.e. + 10 11 =21, + 25 - 43 21 =47), and I've wrote something that can only evaluate expressions with single digit operands(like +99=18 and -5*22=1), but I have no idea how to expand this to multiple digit operands.
I've spent forever trying to figure this out and it's due Tuesday, it's starting to get very irritating/stressful :/
So my program now evaluates with two digit operands(Yes!) but my old error handling method now does not work at all, and is going to be a huge pain in the ass to fix it (ugh.)
And error handling is important, I lost 20% on my last project for forgetting to include it.