Union Initialization

alan at allegra.UUCP alan at allegra.UUCP
Fri Nov 18 06:59:07 AEST 1983


Ok, how do I do it?  Can it be done?


	struct
	{
		int x;
		int y;

		union
		{
			int z;
			char *p;
		} u;
	} foo = { 100, 200, 300 };


This doesn't work!


	Alan S. Driscoll
	AT&T Bell Laboratories



More information about the Comp.lang.c mailing list