Write a C++ program that outputs appropriate messages for matching grouping symbols, such as parentheses and braces, in the input arithmetic expression.
For example, the expression "{25+(3-6)*8}" contains matching grouping symbols (curly braces and parentheses), while in case of "[25+{3-6)*8]" only matching grouping symbols are square brackets and curly brace and parentheses are unmatched.
The attached program handles curly, round (parentheses) and square brackets but not the nesting of same grouping symbol. It also prints error messages in case of unmatched grouping symbols.