Microsoft Visual C++


Microsoft Visual C++ is an integrated development environment product from Microsoft for the C, C++, and C++/CLI programming languages. MSVC is proprietary software; it was originally a standalone product but later became a part of Visual Studio and made available in both trialware and freeware forms. It features tools for developing and debugging C++ code, especially code written for the Windows API, DirectX and.NET.
Many applications require redistributable Visual C++ runtime library packages to function correctly. These packages are often installed independently of applications, allowing multiple applications to make use of the package while only having to install it once. These Visual C++ redistributable and runtime packages are mostly installed for standard libraries that many applications use.

History

The predecessor to Visual C++ was called Microsoft C/C++. There was also a Microsoft QuickC 2.5 and a Microsoft QuickC for Windows 1.0. The Visual C++ compiler is still known as Microsoft C/C++ and as of the release of Visual C++ 2015 Update 2, is on version 14.0.23918.0.

16-bit versions

The predefined macro _MSC_VER indicates the major and minor version numbers of the Visual C++ compiler. The macro's value is an integer literal in which the last two digits indicate the minor version number and the preceding digits indicate the major version number.
From Visual Studio 2017, _MSC_VER is . Thus, for example, the version of MSVC++ 14.11 that ships with Visual Studio 2017 version 15.3.0 sets _MSC_VER to 1911. Microsoft recommends using the >= operator to test the value of _MSC_VER.
Here are values of _MSC_VER for various versions of Visual C++:

MSC 1.0 _MSC_VER 100
MSC 2.0 _MSC_VER 200
MSC 3.0 _MSC_VER 300
MSC 4.0 _MSC_VER 400
MSC 5.0 _MSC_VER 500
MSC 6.0 _MSC_VER 600
MSC 7.0 _MSC_VER 700
MSVC++ 1.0 _MSC_VER 800
MSVC++ 2.0 _MSC_VER 900
MSVC++ 4.0 _MSC_VER 1000
MSVC++ 4.2 _MSC_VER 1020
MSVC++ 5.0 _MSC_VER 1100
MSVC++ 6.0 _MSC_VER 1200
MSVC++ 7.0 _MSC_VER 1300
MSVC++ 7.1 _MSC_VER 1310
MSVC++ 8.0 _MSC_VER 1400
MSVC++ 9.0 _MSC_VER 1500
MSVC++ 10.0 _MSC_VER 1600
MSVC++ 11.0 _MSC_VER 1700
MSVC++ 12.0 _MSC_VER 1800
MSVC++ 14.0 _MSC_VER 1900
MSVC++ 14.1 _MSC_VER 1910
MSVC++ 14.11 _MSC_VER 1911
MSVC++ 14.12 _MSC_VER 1912
MSVC++ 14.13 _MSC_VER 1913
MSVC++ 14.14 _MSC_VER 1914
MSVC++ 14.15 _MSC_VER 1915
MSVC++ 14.16 _MSC_VER 1916
MSVC++ 14.2 _MSC_VER 1920
MSVC++ 14.21 _MSC_VER 1921
MSVC++ 14.22 _MSC_VER 1922
MSVC++ 14.23 _MSC_VER 1923
MSVC++ 14.24 _MSC_VER 1924
MSVC++ 14.25 _MSC_VER 1925
MSVC++ 14.26 _MSC_VER 1926

These version numbers refer to the major version number of the Visual C++ compilers and libraries, as can be seen from the installation directories. It does not refer to the year in the name of the Visual Studio release. A thorough list is available.
Note that the C++ compiler executable version matches _MSC_VER and is different from the version of the Visual C++ product as a whole. For example the cl.exe included in MSVC++ 14.22 reports its version as 19.22.27905 if run without arguments.

Compatibility

ABI

The Visual C++ compiler ABI have historically changed between major compiler releases. This is especially the case for STL containers, where container sizes have varied a lot between compiler releases. Microsoft therefore recommends against using C++ interfaces at module boundaries when one wants to enable client code compiled using a different compiler version. Instead of C++, Microsoft recommends using C or COM interfaces, which are designed to have a stable ABI between compiler releases.
All 14.x MSVC releases have a stable ABI, and binaries built with these versions can be mixed in a forwards-compatible manner, noting the following restrictions:
Visual C++ ships with different versions of C runtime libraries. This means users can compile their code with any of the available libraries. However, this can cause some problems when using different components in the same program. A typical example is a program using different libraries. The user should use the same C Run-Time for all the program's components unless the implications are understood. Microsoft recommends using the multithreaded, dynamic link library to avoid possible problems.

C

Although the product originated as an IDE for the C programming language, for many years the compiler's support for that language conformed only to the original edition of the C standard, dating from 1989, but not the C99 revision of the standard. There had been no plans to support C99 even in 2011, more than a decade after its publication.
Visual C++ 2013 finally added support for various C99 features in its C mode, though it was still not complete. Visual C++ 2015 further improved the C99 support, with full support of the C99 Standard Library, except for features that require C99 language features not yet supported by the compiler.
Most of the changes from the C11 revision of the standard are still not supported by Visual C++ 2017. For example, generic selections via the _Generic keyword are not supported by the compiler and result in a syntax error.
The preprocessor was overhauled in 2018, with C11 in sight:
_Generic support has been committed to MSVC as of February 2020, not clear on when it will ship.