There exists the PVS-Studio code analyzer. It integrates into the Visual Studio 2005/2008/2010 environment and allows you to detect errors in C/C++/C++11 programs (see samples of errors it can detect). Regarding its advantages, we can note usability, detailed documentation, on-the-fly analysis and the best diagnostics of 64-bit errors.

The reason for the secret

Unfortunately, being one of the PVS-Studio's creators, I'm sad about the number of the distribution package's downloads from the site. They are very few. I see the reason: people are accustomed to thinking that it's not so easy for a programmer to try a commercial analyzer. You have to deal with the commercial manager at first and only then you might be allowed to get the demo version. I think many people even don't try to visit the Download page waiting to see a huge fill-in form or a message kind of "if you want to try, write to us".

We don't approve this method. We believe that a person should be able to easily try and purchase a software product. Our opinion completely coincides with the one of Alex Payne who has written the article "How Not To Sell Software in 2012".

The secret

The secret thing about PVS-Studio is that nobody knows that you can easily try and purchase it. Moreover, PVS-Studio can be used for free at first. The version you download from the site is completely full-function!

The demo version's restrictions will only occur when you have fixed 100 errors in your program using our tool. If your project is small or contains just a few errors, you will be able to use PVS-Studio without purchasing a license. But if you have fixed 100 errors in your program with PVS-Studio, it's fair that you buy a license to go on eliminating both old and fresh errors.

Download and try PVS-Studio: http://www.viva64.com/en/pvs-studio-download/