#include<iostream.h>#include<string.h>union PERSON{int age;float weight;char name[25];};void print(PERSON one){cout <<one.name<<"\t"<<one.age<<"\t"<<one.weight<<"\n";}void main(){PERSON all={33};print(all);all.weight=80;print(all);strcpy(all.name,"ding");print(all);}
- 1 回答
- 0 關注
- 108 瀏覽
添加回答
舉報
0/150
提交
取消