二维数组取值

#include<iostream>
using namespace std;
int main()
{
	int a[3][4] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };
	int*p, (*pt)[4], i, j;
	for (p = a[0]; p < a[0] + 12; p++)
		cout << *p << endl;
	pt = a;
	cout << *(*(pt + 1) + 4) << endl;
	system("pause");
	return 0;

}

你可能感兴趣的:(二维数组取值)