int ia[3][4] = { 0,1,2,3,4,5,6,7,8,9,10,11 };
ia is an array of 3 arrays of 4 int each.
ia[0] { 0, 1, 2, 3 } .
ia[1] { 4, 5, 6, 7 } .
ia[2] { 8, 9, 10, 11 } .
I don’t quite understand why you say that we will “initialize” it - at the moment, ia fully initialized.
int(&row)[4] = ia[1];
Spiral rule (start with id ...):
row
... is an...
(&row)
... link ...
(&row)[4]
... into an array of four ...
int(&row)[4]
... int ...
= ia[1];
... ia[1] initialized (because you must initialize the link without bypassing it in any way).
So row now a reference to ia[1] , which is of type "array of four int ". That is all that is needed.
source share