C++ Language Reference
This reference explains the C++ programming language as implemented in the Microsoft C++ compiler. The organization is based on The Annotated C++ Reference Manual by Margaret Ellis and Bjarne Stroustrup and on the ANSI/ISO C++ International Standard (ISO/IEC FDIS 14882). Microsoft-specific implementations of C++ language features are included.
For an overview of Modern C++ programming practices, see Welcome Back to C++.
See the following tables to quickly find a keyword or operator:
In This Section
Fundamental lexical elements of a C++ program: tokens, comments, operators, keywords, punctuators, literals. Also, file translation, operator precedence/associativity.
Scope, linkage, program startup and termination, storage classes, and types.
Built-in types The fundamental types that are built into the C++ compiler and their value ranges.
Type conversions between built-in types. Also, arithmetic conversions and conversions among pointer, reference, and pointer-to-member types.
Declarations and definitions Declaring and defining variables, types and functions.
Operators, Precedence and Associativity
The operators in C++.
Types of expressions, semantics of expressions, reference topics on operators, casting and casting operators, run-time type information.
A programming technique that implicitly defines a function object class and constructs a function object of that class type.
Expression, null, compound, selection, iteration, jump, and declaration statements.
Classes and structs
Introduction to classes, structures, and unions. Also, member functions, special member functions, data members, bit fields,
this pointer, nested classes.
User-defined types in which all members share the same memory location.
Single and multiple inheritance,
virtual functions, multiple base classes, abstract classes, scope rules. Also, the
Controlling access to class members:
protected keywords. Friend functions and classes.
Overloaded operators, rules for operator overloading.
C++ exception handling, structured exception handling (SEH), keywords used in writing exception handling statements.
Assertion and User-Supplied Messages
#error directive, the
static_assert keyword, the
Template specifications, function templates, class templates,
typename keyword, templates vs. macros, templates and smart pointers.
Declaring events and event handlers.
Modifiers specific to Microsoft C++. Memory addressing, calling conventions,
naked functions, extended storage-class attributes (
Using assembly language and C++ in
Compiler COM Support
A reference to Microsoft-specific classes and global functions used to support COM types.
Microsoft extensions to C++.
Information about nonstandard behavior of the Microsoft C++ compiler.
Welcome Back to C++
An overview of modern C++ programming practices for writing safe, correct and efficient programs.
Component Extensions for Runtime Platforms
Reference material on using the Microsoft C++ compiler to target .NET.
C/C++ Building Reference
Compiler options, linker options, and other build tools.
C/C++ Preprocessor Reference
Reference material on pragmas, preprocessor directives, predefined macros, and the preprocessor.
Visual C++ Libraries
A list of links to the reference start pages for the various Microsoft C++ libraries.
Submit and view feedback for