This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Array of Structures Initialization


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]