二维数组取值

来源:互联网 发布:2017应届生工资知乎 编辑:程序博客网 时间:2024/04/30 04:31
#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;}

0 0
原创粉丝点击