Loading, please wait...

Operations

The operations that can be performed on a union are the following: assigning a union to another union of the same type, taking the address (&) of a union variable, and accessing union members using the structure member operator and the structure pointer operator.

 

Unions may not be compared using operators == and != for the same reasons that structures cannot be compared.