08/03/31 06:25:26
>>19
亀レスだけど、typedefするのも1つの手。
typedef int IA_5[5];
IA_5 array[3] = {{1,2,3,4,5},{6,7,8,9,10},{11,12,13,14,15}}; // == array[3][5]
IA_5* func(){ return array; }
int main()
{
IA_5* p = func();
for(int i = 0; i < 3; ++i){
for(int j = 0; j < 5; ++j) cout << p[i][j] << " ";
cout << endl;
}
return 0;
}