hi i need help writing a program that will read in input file containing c++ code and then checks for grouping matching symbols like { } ,[ ] ,and ( ). if there is a mismatch symbol in the input file the the program will read and recognize the error.
i have a basic idea on where to start. i know how to implememtn the input file but am haing trouble using "stacks" to make this work. the program will ignore characters and only focus on mismatched symbols. for example:
if the input file is something like this:
int func4(int m, int n)
{
if (n==0)
return 0;
else
return m+func4(m,n-1}:
}
the error would by the mismtch symbols ( }
any help would be greatly appreciated!
thank you