Q:

A type alias (§ 2.5.1, p. 67) can make it easier to read, write, and understand pointers to multidimensional arrays. For example

0

A type alias (§ 2.5.1, p. 67) can make it easier to read, write, and understand pointers to multidimensional arrays. For example.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

using int_array = int[4]; // new style type alias declaration; see § 2.5.1 (p.
68)
typedef int int_array[4]; // equivalent typedef declaration; § 2.5.1 (p. 67)
// print the value of each element in ia, with each inner array on its own line
for (int_array *p = ia; p != ia + 3; ++p) {
 for (int *q = *p; q != *p + 4; ++q) cout << *q << ' '; cout << endl;
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now