关于union
#include <iostream>using namespace std;union Prac{ char ch; int i; float f; double d;};int main(){ Prac u1; u1.ch = 'a'; cout << u1.ch << endl; cout << u1.i << endl; cout << u1.f << endl; cout << u1.d << endl; cout << u1.i << endl; return 0;}/* 输出为:a971.35926e-043nan97*/