Appendix C C++ Syntax Summary

This appendix, which summarizes the syntax of the C++ language, is intended as a quick reference. It is not intended as an absolutely exhaustive description of everything possible in C++, although on some points it comes close. Please refer also to Appendix A: Operators and Appendix B: Intrinsic Data Types.

Literal Constants

Literal constants in C++ can take several forms:

    integer_number    floating_pt_number    'ASCII_symbol'    "literal_string"    { constant, constant, ... }

The last form is recursive, so you can have aggregates within aggregates, which is meaningful when initializing a multidimensional array:

    matrix[10][10] = {{1, 2, 3}, {4, 5, 6} };

This example initializes the first three elements ...

Get C++ Without Fear: A Beginner’s Guide That Makes You Feel Smart now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.