Update project.cpp

Added a function to check for unmatched braces. I found it easier to search for the number of braces and see if they match. If there is a mismatch then the program output an error message and prompts user to end the program.