C++, like C, is a language that is heavily reliant on a rich set of library functions to provide the following:
Portable operating-system interface (file and screen I/O)
String and buffer manipulation
Floating-point math transformations
Character classification information
Other supporting functionality
For information about the run-time library functions, see the Run-Time Library Reference manual. For information about the Microsoft Foundation class library or the iostream classes, see the Class Libraries Reference manual.
This manual is intended for programmers who have already learned the fundamentals of C++ programming; it is not intended as a learning guide. For information about learning C++, see the C++ Tutorial.
This manual is organized as follows:
Chapter 1, “Lexical Conventions,” introduces the fundamental elements of a C++ program, as they are meaningful to the compiler. These elements, called “lexical elements,” are used to construct statements, definitions, declarations, and so on, which are used to construct complete programs.
Chapter 2, “Basic Concepts,” explains concepts such as scope, linkage, program startup and termination, storage classes, and types. These concepts are key to understanding C++. Terminology used in this book is also introduced in this chapter.
Chapter 3, “Standard Conversions,” describes the type conversions the compiler performs between built-in, or “fundamental,” types. It also explains how the compiler performs conversions among pointer, reference, and pointer-to-member types.
Chapter 4, “Expressions,” describes C++ expressions—sequences of operators and operands that are used for computing values, designating objects or functions, or generating other side effects.
Chapter 5, “Statements,” explains the C++ program elements that control how, and in what order, programs are executed. Among the statements covered are expression statements, compound statements, selection statements, iteration statements, jump statements, declaration statements, and null statements.
Chapter 6, “Declarations,” is one of three chapters devoted to how complete declarations are used to form declaration statements. This chapter describes such topics as storage-class specifiers, function definitions, initializations, enumerations, class, struct, and union declarations, and typedef declarations. Related information can be found in Chapter 7, “Declarators,” and Appendix B, “Microsoft-Specific Modifiers.”
Chapter 7, “Declarators,” explains the portion of a declaration statement that names an object, type, or function.
Chapter 8, “Classes,” introduces C++ classes. C++ treats an object declared with the class, struct, or union keyword as a class type. This chapter explains how to use these class types.
Chapter 9, “Derived Classes,” covers the details of inheritance—a process by which you can define a new type as having all the attributes of an existing type, plus any new attributes you add.
Chapter 10, “Member-Access Control,” explains how you can control access to class members. Use of access-control specifiers can help produce more robust code because you can limit the number of ways an object's state can be changed.
Chapter 11, “Special Member Functions,” describes special functions unique to class types. These special functions perform initialization (constructor functions), cleanup (destructor functions), and conversions. This chapter also describes the new and delete operators, which are used for dynamic memory allocation.
Chapter 12, “Overloading,” explains a C++ feature that allows you to define a group of functions with the same name but different arguments. Which function in the group is called depends on the argument list in the actual function call. In addition, this chapter covers overloaded operators, a mechanism for defining your own behavior for C++ operators.
Chapter 13, “Preprocessing,” describes the C++ preprocessor, as well as the pragmas recognized by Microsoft C++.
Appendix A, “Phases of Translation,” explains in what order a C++ program is translated from source code to an executable file.
Appendix B, “Microsoft-Specific Modifiers,” describes the modifiers specific to Microsoft C++. These modifiers control memory addressing, calling conventions, and so on.
Appendix C, “Grammar Summary,” is a summary of the C++ grammar with the Microsoft extensions. Portions of this grammar are shown throughout this manual in “Syntax” sections.