Question: I need help implementing a stack using an ARRAY in C++. The code should have the functions pop() and push(). The code has to read

I need help implementing a stack using an ARRAY in C++. The code should have the functions pop() and push(). The code has to read the characters from a text file to put onto the stack that I will put down below. I need to be able to check to see if the letters are matching. For example if the first character is capital it is added to the stack if the second letter is lowercase the letter is popped and we have to see if it is the lowercase character of the uppercase pooped character. Therefore A a would return macth. If you try to pop from an empty stack an error message should display. if you have reached the end of the file then an error message should display before printing the results of the stack. Repeat until you reach the end file. Please do not answer using user input instead of the file listed

alphabet.txt

A a

B c

C c

D f

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!