I need to initialize array of this structure:
struct a {
int *a;
int *b;
int count;
};
My code looks like this;
struct a[] =
{
{{1,2},{3,4}, 2},
{{1},{3}, 1}
};
This will compile, but segfaults, when program tries to access first element of field.
aandb.gcc -Wall -Wextra -Werrorfor example.