#include <iostream>
using namespace std;
struct Test
{
int a;
char b;
};
void main()
{
Test X,Y;
X.a=2;
X.b='k';
Y=X;
cout<<"X.a="<<X.a<<","<<"X.b="<<X.b<<endl;
cout<<"Y.a="<<Y.a<<","<<"Y.b="<<Y.b<<endl;
cout<<"&Y="<<&Y<<","<<"&X"<<&X<<endl;
}
如果是类的话,则需重载运算符。