CppCheck official website Download: http://cppcheck.sourceforge.net/
There are two ways to use:
One: to use the form of plug-VS
Two: direct use client interface GUI, to detect
The second approach ignores, simply double-click the installation exe program with a GUI identified under the package, saying that the use of a method of Lower Dir,
Steps:
1. Open VS, Tools -> external tools into the interface:
2. Click the Add button
The title set cppcheck , path commands are mounted to EXE , parameters --enable = all $ (SolutionDir)
Fill in the following, remember to check the use of the output window
3, use, click on Tools - "drop-down window, there cppcheck button clicks, the output window will prompt many warnning , one by one check, and some can be ignored.
Screenshot below:
Cppcheck check information
error: error in the code items, including memory leaks;
warning: Programming To avoid bug and provide suggestions for improvement;
style: coding style prompt you which function is not used, which is redundant code and so on;
Portability: When prompted cross-platform prone to problems;
Performance: this part of the code can be optimized;
information: additional information can be ignored;