I want to initialize a struct element, split in declaration and initialization. This is what I have:
typedef struct MY_TYPE { bool flag; short int value;
I found another way to initialize structs.
The struct:
typedef struct test { int num; char* str; } test;
Initialization:
test tt = { num: 42, str: "nice" };
As per GCC’s documentation, this syntax is obsolete since GCC 2.5.