// test.C

#include <iostream.h>

int main()
{
  struct MilesType { float value; }; 
  struct KmType { float value; };

  union MilesOrKm {
    MilesType m;
    KmType    km;
  };

  MilesOrKm distance;
  distance.m.value = 5.7;
  MilesOrKm  length;

  length.m = distance.m;
  cout << "length is "
       << length.km.value << endl;
}
