// ConsoleApplication1.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "iostream"
using namespace std;
union alan
{
	char c;
	int i;
	double d;
};
typedef union alan D;
int _tmain(int argc, _TCHAR* argv[])
{
	D p1;
	p1.c='c';
	cout<<p1.c<<"\t"<<p1.d<<"\t"<<p1.i<<endl;
	p1.i=5;
	cout<<p1.c<<"\t"<<p1.d<<"\t"<<p1.i<<endl;
	p1.d=1231,54165;
	cout<<p1.c<<"\t"<<p1.d<<"\t"<<p1.i<<endl;
	getchar();
	return 0;
}

