When I read some source code, I found a newanother way to initialize structs.
The struct as follow:
typedef struct test {
int num;
char* str;
} test;
typedef test{
int num;
char* str;
}test; Initialization:
test tt=tt = {
num:0 42,
str: "nice"
};
As per GCC’s documentation, this syntax is obsolete since GCC 2.5.