Analyzing your C++ code

Static analysis of C++ code is a feature offered by VS Express and the premium editions of Visual Studio. Static analysis is a useful way to locate potential problems in your code and provides a way to catch a wide range of problems early in the development cycle.

In this recipe, we will show you how to use Visual Studio's built-in static analysis tools.

Getting ready

Start Visual Studio and create a new Empty Project under Visual C++, giving it a name of your choice.

How to do it…

For this project, perform the following steps:

  1. Right-click on the project and select Properties.
  2. Navigate to Configuration Properties | General, change Configuration Type to Static Library (.lib), and click on OK.
  3. Add a new Header File to the project ...

Get Visual Studio 2013 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.