关于地址的问题
#include<iostream>using namespace std;
int main()
{
int s[5]={1,2,3,4,5};
int *a=s;
cout<<"s="<<s<<endl;
cout<<"a="<<a<<endl;
for (int i=1;i<5;i++)
cout<<i<<" "<<(a++)<<endl;
system("pause");
}
为嘛,地址输出的不是连续的,而是隔4个??
2013-01-03 14:33
2013-01-03 17:14
2013-01-03 17:17
2013-01-03 17:18
2013-01-03 19:10
2013-01-04 10:39