Array of Structures Initialization

Eljay Love-Jensen eljay@adobe.com
Mon Nov 15 14:41:00 GMT 2004


Hi Kevin,

It looks like you are using NULL to initialize a union.  If I recall 
correctly, you can't do that in C (nor in C++).

Change the Arguments default_value to:
InputValue* default_value;
You'll have to allocate a InputValue structure explicitly.

Or remove InputValue from Arguments and add in:
double default_Double;
long default_Long;
char* default_CharStar;

Yeah, it wastes a few bytes.  But it's just a few bytes, and unless every 
byte is valuable it shouldn't be too egregious overhead.

HTH,
--Eljay



More information about the Gcc-help mailing list