0
typedef struct {
int tamanho;
nodo *inicio;
} lista;
typedef struct {
lista **vet;
int tamTabHash;
int colisoes;
} tabHash;
tabHash *criaTabelaHash(int tamanho){
if(tamanho < 1) return NULL;
tabHash* hash = (tabHash*)malloc(sizeof(tabHash));
hash->tamTabHash = tamanho;
hash->colisoes = 0;
hash->vet = (lista**)calloc(tamanho, sizeof(lista*));
return hash;
}
void gerarRelatorioHash(tabHash *th) {
int i;
int listocupada = 0, listvazia = 0;
for (i = 0; i < th->tamTabHash ; i++) {
if(th->vet[i]->tamanho >= 0) { // essa linha me da falha de segmentacao
}
}
That line from
if
has a{
without a}
.– Victor Stafusa
I forgot to put it at the time to send the question but the code is right. I’m reading a txt with 10,000 names, when I have it report generated from 1918
– Felipe Santos