write a function that takes a string parameter and determines whether the string con 5155494
Write a function that takes a string parameter and determines whether the string contains matching grouping symbols. Grouping symbols are parenthesis ( ) , brackets [] and curly braces { }. For example, the string {a(b+ac)d[xy]g} and kab*cd contain matching grouping symbols. However, the strings ac)cd(e(k, xy{za(dx)k, and {a(b+ac}d) do not contain matching grouping symbols. (Note: open and closed grouping symbols have to match both in number and in the order they occur in the string). Your function must use a stack data structure to determine whether the string parameter satisfies the condition described above. You may define your own stack class or use the STL stack class.
Write a driver program (i.e. a function main()) to test your function.
Deliverables:
1. a copy of your function and the test driver program source codes in a text file
2. screen shots of your test driver program runs showing it meets the problem's specifications.
PreviousNext