I want to create a struct
where there will be a vector of structs
... The way I thought about doing this was something like this:
typedef struct{
char *teste_str;
int teste_int;
}TESTE_A;
typedef struct{
TESTE_A **t;
}TESTE_B;
TESTE_B teste;
int main(void)
{
teste.t = (TESTE_A**)malloc(3 * sizeof(TESTE_A*));
teste.t[0]->teste_int = 25;
printf("%d\n", teste.t[0]->teste_int);
return 0;
}
But why does not the member value change and the program give error?