Chapter 6. Pointers, Arrays, and References

C++ enables you to do a great deal by using simple variables. To write real programs, however, you need to learn how to create more complex data types, beginning with pointers, arrays, and references.

Arrays are important because they are the most basic kind of container in the language. By creating an array, you can have N of something, where N is any positive whole number. Pointers, a closely related topic, are important because they have a close relationship to arrays and are used to manipulate them.

I begin with the subject of references, however, because these are the easiest to start using in your own programs.

6.1. References

A reference is a variable that works as an alias for another variable. ...

Get C++ for the Impatient 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.