I am trying to code a C++ program which will read a .cpp/.c file and find the syntax error in that like missing semi colons,braces,etc. I need this program to find at least 15 syntax error. Any idea on logic like how to do it?
I came up with this for braces like to count the number of opening braces and no of closing braces and both should be equal