Question: NYHOFF'S STACK CLASS MUST BE USED FOR THIS ASSIGNMENT. THE USE OF THE STL STACK CLASS IS PROHIBITED. The only good stack is an empty

NYHOFF'S STACK CLASS MUST BE USED FOR THIS ASSIGNMENT. THE USE OF THE STL STACK CLASS IS PROHIBITED.
The only good stack is an empty stack is an expression that is often heard in mathematical programming. This thought is especially applicable to parentheses and brackets; a solitary delimeter is invariably up to no good.
Write a program that reads an expression and stacks the delimeters {,[, and (. As their matching counterparts },], and ) appear, they should be popped. Your program should detect two error conditions unpaired delimiters (like {5/[3+7]) and misordered delimeters (like {5/[3+7}-2] and announce which delimeter was expected. All operators and operands should be ignored.
NYHOFF'S STACK CLASS MUST BE USED FOR THIS ASSIGNMENT. THE USE OF THE STL STACK CLASS IS PROHIBITED

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!