Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

How to: Invoke Code Analysis for C/C++

Code analysis tool detects common coding errors, such as buffer overrun, un-initialized memory, null pointer dereference, and memory and resource leaks.

To enable code analysis for C/C++ code

  1. Open a project in Visual Studio.

  2. On the Project menu, click Properties.

  3. Click Code Analysis.

  4. In the Enable Code Analysis for C/C++ list, select Yes (/analyze) and then click OK.

To disable code analysis for C/C++ code

  1. Open a project in Visual Studio.

  2. On the Project menu, click Properties.

  3. Click Code Analysis.

  4. In the Enable Code Analysis for C/C++ list, select No and then click OK.

Community Additions

ADD
Show:
© 2015 Microsoft