Arrays as Homogeneous Aggregates
An array is a set of elements of the same data type. One can visualize an array as a set of contiguous memory locations. These locations are all of the same size and represent components of the same type. We can define arrays of integers, or floating point values, or characters, or any programmer-defined type as long as this type is known at the place in the source code where the array is being defined.
Arrays as Vectors of Values
The ordinary variables we studied in Chapter 3, "Working with C++ Data and Expressions," are called scalars or atomic variables (simple variables).
They are characterized by a single value. Sometimes you might want to distinguish between different components of the value, for example, ...
Get Core C++ A Software Engineering Approach 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.