tags:

views:

39

answers:

1

i have a union

union filter_row
  {
        MAC_Filter MAC;
        IP_Filter IP;
        TCP_Filter TCP;
        UDP_Filter UDP;
        ICMP_Filter ICMP;
        ARP_Filter ARP;
  };

the members of this union is structure....how to mask the members of structures...do i have to intialize them to all 1's initially???

+1  A: 

All members of a union share the same storage space, enough to accommodate the alignment and size of the largest and most restrictive of the members. Normally, you'd also require a member in the structure to indicate what union member to use.

Vatine