So let's say we're using a stack that fluctuates, as in infix to postfix expression conversions. At any given moment the stack may be empty, and if so it would abort because of the underthrow? What would be a good alternative?
So let's say we're using a stack that fluctuates, as in infix to postfix expression conversions. At any given moment the stack may be empty, and if so it would abort because of the underthrow? What would be a good alternative?
Wow, a lot of very interesting topics expressed here. Back to the actual question:
Why, are you using an explicit stack for this? This can easily be handled via a series of function calls, as in most constructs of this type. What topic are you trying to learn?
Well, that depends on how you have setup your program. Where is it that you use your try-catch block? Do you even understand how they work?