| 发表于:2007-08-10 22:36:257楼 得分:0 |
#include <stdio.h> #include <iostream> using namespace std; void main() { int *p; int a[3][3]={1,2,3,4,5,6,7,8,9}; //创建3行3列数组 p = &a[1][1];//整型指针指向第二行第二列 cout < <*p < <endl;//输出p指向的对象 system( "pause "); return; } int a[3][3]={1,2,3,4,5,6,7,8,9}如下: 1 2 3 4 5 6 7 8 9 5就是第二行第二列 | | |
|