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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.