/* illustrates pointers to arrays and their relation to multidimensional arrays; also illustrates typedef used to create new type */ #include typedef double (*array_pointer)[2]; array_pointer function2(double[][2]); void main(){ double d[2][2] = {21,22,23,24}; array_pointer f = function2(d); cout << "f[0][0] = " << f[0][0] << ", f[0][1] = " << f[0][1] << ", f[1][0] = " << f[1][0] << ", f[1][1] = " << f[1][1] << endl; cout << "f = " << f << ", d = " << d << endl; } array_pointer function2(double e[][2]){ return e; }