typedef enum {COINS, DOLLARS} MoneyTag; typedef struct { MoneyTag tag; union { int coins; int dollars; } val; } Money;