O'Reilly logo

C++ Without Fear: A Beginner’s Guide That Makes You Feel Smart by Brian Overland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required