Re: Array of size zero!
vashwath_at_rediffmail.com
Date: 12/31/04
- Next message: vashwath_at_rediffmail.com: "Re: Array of size zero!"
- Previous message: Emmanuel Delahaye: "Re: tricky assignment statemenent"
- Next in thread: vashwath_at_rediffmail.com: "Re: Array of size zero!"
- Maybe reply: vashwath_at_rediffmail.com: "Re: Array of size zero!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 31 Dec 2004 03:58:03 -0800
>
> It was a pre-C99 standard trial to have a flexible member array.
> The struct could be allocated this way :
> someStruct *s = malloc(sizeof (someStruct) + 42);
> So, with a single malloc, you allocated the struct and the array
objects
> simultaneously.
> In C99 a flexible array member should be declared :
> struct someStruct {
> int i;
> char array[];
> };
>
> --
> Richard
Does it works for all types(including structures) or it works only for
array of char's?
- Next message: vashwath_at_rediffmail.com: "Re: Array of size zero!"
- Previous message: Emmanuel Delahaye: "Re: tricky assignment statemenent"
- Next in thread: vashwath_at_rediffmail.com: "Re: Array of size zero!"
- Maybe reply: vashwath_at_rediffmail.com: "Re: Array of size zero!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|