Hello,

If the following is valid:-
Code:
typedef struct {
    int a;
    int b;
    char *name;
} thing;

thing g_thing = { 1, 2, "Hello" };
Why isn't:-
Code:
typedef struct {
    int a;
    int b;
    int *array;
} thing;

thing g_thing { 1, 2, { 3, 4, 5 } };
As the string literal in the first example effectively points to the area of memory used to store an array of chars, why doesn't the use of braces in the second example do the same for the array of ints? Are string literals a special case?

I would like to be able to do what is described in the second example so that I don't end up with wave after wave of constants that get assigned into structs and are never referred to after that.