Question: I need help implementing a stack using an Array in c++. The program should have the push() and pop() functions. The program must determine if

I need help implementing a stack using an Array in c++. The program should have the push() and pop() functions. The program must determine if parenthesis are balanced or not using a file for input. if the parenthesis are opened they are added to the stack if the parenthesis are closed and the stack is empty return an error message. You should pop the stack when you come to closed parenthesis and determine if the parenthesis match. If they match return matched and if not return not matched. It must keep going until the end of file. If possible please don't use case. Please use the file provided

parenth.txt (file)

() (]

(] ()

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 Databases Questions!