Cppcheck is a static analysis tool for C/C++ code. Cppcheck does not detect syntax errors like C/C++ compilers but tries to detect bugs that are not visible by the compiler like memory leaks or out of bounds.
Cppcheck is a command line tool but don’t panic, a GUI is also available. With Cppcheck, you can analyze a single file or the content of a whole folder.