看看这段程序~~~~~
#include<iostream>
using namespace std;
union un
{
int x,f,e;
struct
{
int a, b, c;
} y; //y在这表示什么
} z; //z在这表示什么
int main()
{
z.x = 5;
z.f = 7;
z.e = 9;
z.y.a = 1;
z.y.b = 2;
z.y.c = 3;
cout << z.x << endl;
cout << z.f << endl;
cout << z.e << endl;
system("pause");
return 0;
}