C++ Language Reference
This reference explains the C++ programming language as implemented in Microsoft Visual C++. 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.
See the following tables to quickly find a keyword or operator:
In This Section
- New C++ Language Features
Reference section for syntax that lets you target the common language runtime.
- Compatibility and Compliance Issues in Visual C++
Information about where Visual C++ does not agree with the C++ standard, and breaking changes in the compiler.
- Lexical Conventions
Fundamental lexical elements of a C++ program: tokens, comments, operators, keywords, punctuators, literals. Also, file translation, operator precedence/associativity.
- Basic Concepts
Scope, linkage, program startup and termination, storage classes, and types.
- Standard Conversions
Type conversions between built-in, or "fundamental," types. Also, arithmetic conversions and conversions among pointer, reference, and pointer-to-member types.
- Expressions
Types and semantics of expressions, reference topics on operators, casting and casting operators, run-time type information.
- Statements
Expression, null, compound, selection, iteration, jump, and declaration statements.
- Declarations
Storage-class specifiers, function definitions, initializations, enumerations, class, struct, and union declarations, and typedef declarations. Also, inline functions, const keyword, namespaces.
- Declarators
The portion of a declaration statement that names an object, type, or function. Abstract declarators, type names, initializers, function declarations and definitions, arrays, references.
- Classes, Structures, and Unions
Introduction to classes, structures, and unions. Also, member functions, data members, bit fields, this pointer, nested classes.
- Derived Classes
Single and multiple inheritance, virtual functions, multiple base classes, abstract classes, scope rules. Also, the __super and __interface keywords.
- Member-Access Control
Controlling access to class members: public, private, and protected keywords. Friend functions and classes.
- Special Member Functions
Special functions unique to class types: constructors, destructors, conversion functions, assignment operator, operator new and operator delete functions.
- Overloading
Overloaded functions, declaration matching, argument matching. Also, overloaded operators, rules for operator overloading.
- Exception Handling
C++ exception handling, structured exception handling (SEH), keywords used in writing exception handling statements.
- Templates
Template specifications, function templates, class templates, typename keyword, templates vs. macros, templates and smart pointers.
- Event Handling
Declaring events and event handlers.
- Microsoft-Specific Modifiers
Modifiers specific to Microsoft C++. Memory addressing, calling conventions, naked functions, extended storage-class attributes (__declspec), __w64.
- Inline Assembler
Using assembly language and C++ in __asm blocks.
- Compiler COM Support
A reference to Microsoft-specific classes and global functions used to support COM types.
Related Sections
- New C++ Language Features
Reference material on using Visual C++ to target the common language runtime.
- 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.
- C Language Reference
A reference to the C programming language, including Microsoft extensions.
- Visual C++ Libraries
A list of links to the reference start pages for the various Visual C++ libraries.