[C++程序设计]用指向数组的指针作函数参数

 1 #include <iostream>
 2 using namespace std;
 3 
 4 int main()
 5 {
 6     void output(int (*p)[4]);
 7     int a[3][4]={1,3,5,7,9,11,13,15,17,19,21,23};
 8     output(a);
 9     return 0;
10 }
11 
12 void output(int (*p)[4])
13 {
14     int i,j;
15     for(i = 0; i < 3; i ++)
16         for(j = 0; j < 4; j ++)
17             cout << *(*(p + i) + j) << " ";
18     cout << endl;
19 }
原文地址:https://www.cnblogs.com/galoishelley/p/3858393.html