简单的问题
如何输出2维数组2*3的各个值的地址?
2007-06-15 11:59
2007-06-15 12:43
2007-06-15 19:56
为什么是&a[i][j],而不是a[i][j]?
2007-06-15 22:10
2007-06-15 22:24


2007-06-16 01:03

2007-06-16 01:08
#include "iostream.h"
void main()
{
int a[2][3]={5,6,7,8,9,10};
for(int i=0;i<2;i++)
for(int j=0;j<3;j++)
cout<<&a[i][j]<<endl;
}
应该就可以了吧...
2007-06-16 07:55
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
int a[2][3]={5,6,7,8,9,10};
for(int i=0;i<2;i++)
for(int j=0;j<3;j++)
cout<<&a[i][j]<<endl;
system("PAUSE");
return 0;
}

2007-06-16 08:57
2007-06-16 08:59