August 2012
Intermediate to advanced
976 pages
30h 17m
English
Strictly speaking, there are no multidimensional arrays in C++. What are commonly referred to as multidimensional arrays are actually arrays of arrays. It can be helpful to keep this fact in mind when you use what appears to be a multidimensional array.
Exercises Section 3.5.5
Exercise 3.41: Write a program to initialize a vector from an array of ints.
Exercise 3.42: Write a program to copy a vector of ints into an array of ints.
We define an array whose elements are arrays by providing two dimensions: the dimension of the array itself and the dimension of its elements:
int ia[3][4]; // array of size 3; each element ...
Read now
Unlock full access