home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH05 / A05261.TXT < prev    next >
Encoding:
Text File  |  1993-10-18  |  522 b   |  9 lines

  1. You can use a union in specific circumstances; for example, when
  2. you want to conserve storage and you never use more than one
  3. member of a class at a time, or when you want to interpret the
  4. same stored data as having more than one data type.  The data
  5. members overwrite each other in memory, and the size of a union is
  6. the size of its largest data member.  As you can see, a union can
  7. have data members and member functions, and private, protected or
  8. public members.  By default, all members of a union are public.
  9.