关于二维指针方面知识验证
#include<iostream>using namespace std;
int main() {
int a[2][2] = { 1, 2, 3, 4 };
int(*g)[2][2] = &a;
int(*p)[2] = &a[0];
int *q = a[0];
cout << g << endl;
cout << p << endl;
cout << q << endl;
++q;
++p;
++g;
cout << g << endl;
cout << p << endl;
cout << q << endl;
cout << endl;
for (int i = 0; i < 4; ++i) {
cout << (*(*g) + i) << " " << *(*(*g) + i) << endl;
}
system("pause");
return 0;
}