So I have an assignment where I have to enter a phrase with opening and/or closing delimiters (i.e. (a), <e>, <(io>) etc.) where it checks to make sure that the opening and closing delimiters are used correctly and if not to tell you. The problem that I have is that I am now supposed to use a find function to specifically tell me which opening and/or closing delimiter I am missing. Though I understand the concept of the find() function I don't know how I should apply it to this program. Any help is greatly appreciated! Thanks!
So as I realized I made a mistake in how I interpreted the assignment. I am supposed to find the missing limiter or delimiter. However, I do not necessarily need a find function and I'm pretty sure I need to keep the stack.
So now I'm just stuck. I figure that the tweaks that I need have to be in the matcher function. However I just can't get it to recognize the opposite limiter and to print it out. Am I wrong to put it in the matcher function? I just can't figure out how. Can you give me a nudge in the right direction?
Like I said, I misinterpreted what my professor wanted. The friend function suggestion was a hint to figure out the problem. It didn't mean that I had to use it. Also, the program that you just added just tells me the opening the and closing delimiters. It doesn't specify which are missing in a specific situation. I need the program to point out if a '(' is missing or a '['. Also I need to keep the stack