Most, if not all compilers (all that I've ever used) allow you to "preprocess the source file" by using CC -E myfile.cpp > myfile.i
where CC
is the name of your compiler (e.g. CL
, gcc
, g++
, clang
, clang++
, etc.
That will produce large file with everything, and if you have access to an editor that will auto-format your file (like M-x indent-region
in Emacs and the like), you can then use that to indent and see where your unmatched braces are.