This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Array of Structures Initialization
- From: Eljay Love-Jensen <eljay at adobe dot com>
- To: Kevin Stedman <kstedman9 at yahoo dot com>, gcc-help at gcc dot gnu dot org
- Date: Mon, 15 Nov 2004 08:41:43 -0600
- Subject: Re: Array of Structures Initialization
- References: <20041115142157.19003.qmail@web60903.mail.yahoo.com>
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