I have the following structs:
typedef struct bucket {
unsigned int contador;
unsigned int * valor;
} Bucket;
typedef struct indice {
unsigned int bs;
unsigned int valor;
unsigned int capacidade;
Bucket * bucket;
} Indice;
typedef struct tabela {
unsigned int bs;
Indice * indice;
} Tabela;
And I want to do something like this:
tabela->indice[2].bucket = &tabela->indice[0].bucket;
But I get segmentation fault.
How can I get the tabela->indice[0].bucket address and associate to tabela->indice[2].bucket.
Thanks!
I’m probably going to get neg repped agian for attempting to answer a c question, but here goes nothing
have you tried getting rid of the
&?