就换个风格

#include
int main()
{union example
{int num;
char ch[2];
float f;
}u1={100};
cout<<"u1.num="< cout<<"u1.ch="< cout<<"u1.f="< u1.num=97;
cout<<"u1.num="< cout<<"u1.ch="< cout<<"u1.f="< u1.ch[0]='b';
cout<<"u1.num="< cout<<"u1.ch="< cout<<"u1.f="< return 0;
}

 

 

你可能感兴趣的:(模仿)