Flexible array member in C-structure
Posted
by Arpan
on Stack Overflow
See other posts from Stack Overflow
or by Arpan
Published on 2010-06-15T17:33:33Z
Indexed on
2010/06/15
17:42 UTC
Read the original article
Hit count: 180
Quoting from the C-std section 6.7.2.1,
struct s { int n; double d[]; };
This is a valid structure declaration. I am looking for some practical use of this kind of syntax. To be precise, how is this construct any more or less powerful than keeping a double* as the 2nd element? Or is this another case of 'you-can-do-it-in-multiple-ways'?
Arpan
© Stack Overflow or respective owner