The general declaration syntax for unions is similar to that for structures. The differences are:
union local87 { int i; double d; } a = { 20 };
A union can't participate in a class hierarchy. It can't be derived from any class, nor can it be a base class. A union can have a constructor.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|