A use of unions doesn't necessarily involve needing hteme only when a program gets big, actually its just smart use of memory through an entire program. A good example would be that for different screen modes a Pixel may be a different lenth of memory, fo example:
Code:
union PixelType{
unsigned char Eightbit;
unsigned short Sixteenbit;
unsigned long ThirtyTwobit;
}
PixelType pixel;
if(screenmode == 8)
pixel.eightbit = color8;
if(screenmode == 16)
pixel.Sixteenbit = color16;
if(screenmode == 32)
pixel.ThiryTwobit = color32;
However I rarely use them, only because of the ability templates gives you however.