O'Reilly logo

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

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

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