|
|
|
|
|
|
|
there is no aggregate assignment of y to x: |
|
|
|
|
|
|
|
|
To copy array y into array x, you must do it yourself, element by element: |
|
|
|
|
|
|
|
|
for (index = 0; index < 50; index++)
x[index] = y[index]; |
|
|
|
|
|
|
|
|
Similarly, there is no aggregate comparison of arrays: |
|
|
|
|
|
|
|
|
nor can you perform aggregate I/O of arrays: |
|
|
|
|
|
|
|
|
or aggregate arithmetic on arrays: |
|
|
|
|
|
|
|
|
(C++ allows one exception for I/O, as we discuss in Chapter 12. Aggregate I/O is permitted for strings, which are special kinds of char arrays.) Finally, it's not possible to return an entire array as the value of a value-returning function: |
|
|
|
|
|
|
|
|
The only thing you can do to an array as a whole is to pass it as a parameter to a function: |
|
|
|
|
|