A union is a struct [C++ struct] in which all members are allocated at the same address so the union occupies only as much space as its largest member.
A union is a struct [C++ struct] in which all members are allocated at the same address so the union occupies only as much space as its largest member.