1 #include <iostream> 2 #include<stdlib.h> 3 #include<string> 4 #include<vector> 5 #include<cstring> 6 7 8 using namespace std; 9 typedef int int_array[4]; 10 11 int main() 12 { 13 const size_t row=3; 14 const size_t col=4; 15 int ia[row][col]={{0,1,2,3},{4,5,6,7},{8,9,10,11}}; 16 // cout<<ia[1][2]<<endl; 17 for(size_t i=0;i!=row;i++) 18 { 19 for(size_t j=0;j!=col;j++) 20 { 21 cout<<ia[i][j]<<endl; 22 } 23 } 24 25 for(int_array *p1=ia;p1!=ia+3;p1++) 26 { 27 for(int *q=*p1;q!=*p1+4;q++) 28 { 29 cout<<*q<<endl; 30 } 31 } 32 33 int (*ip)[4]; // 34 ip=ia; 35 for(int *q=*ip;q!=*ip+4;q++) 36 { 37 cout<<*q<<endl; 38 } 39 40 return 0; 41 }