关于地址问题,求高手帮忙
#include <iostream>using namespace std;
class A{
public:
unsigned a;
double b;
unsigned c;
double d;
};
void main(){
A a;
cout<<&a.a<<endl<<&a.b<<endl<<&a.c<<endl<<&a.d;
cout<<endl<<"~~~~~~~~~~~~"<<endl;
int e;
double f;
int g;
unsigned h;
cout<<&e<<endl<<&f<<endl<<&g<<endl<<&h;
}
为什么输出a,b,c,d的地址是由小到大,e,f,g,h的地址是由大到小