n维数组 exp

 

 1/*------------------------------------
 2*edward nic
 3*2007.04.14
 4*
 5--------------------------------------*/

 6#include <iostream>
 7#include <process.h>
 8
 9int main(int argc, char *argv[])
10{
11    using namespace std ;
12    const int arr[2][2][2= {{1,2},{3,4}},
13                               {{5,6},{7,8}} }
 ;
14                               
15    typedef const int nArr1[2][2] ;
16    typedef const int nArr2[2] ;
17    
18    for (nArr1 *ppp = arr; ppp != arr + 2; ppp++)
19    {
20        for (nArr2 *pp = *ppp; pp != *ppp + 2; pp++)
21        {
22            for(const int *= *pp; p != *pp + 2; p++)
23            {
24                 cout << *<< endl ;
25            }

26        }

27    }

28        
29    system("pause") ;
30    return 0 ;
31}
 
32
posted @ 2007-04-14 17:54  Edward Xie  阅读(193)  评论(0)    收藏  举报