Allocation dynamique d'une table de hachage

Fermé
Bonjour,
je programme en C, et je suis sure que le compilateur est du C, mais le probleme c'est qu'il maffiche un msg bizarre :
"invalid conversion from `void*' to `table_hachage*' "
voila le code : la fnction d'allocation :

struct table_hachage * alloue_h(int n)
{
int i;

struct table_hachage *h = malloc(sizeof(struct table_hachage));/*allocation de la structure*/

h->N=n;/*definition de la taille du tableau*/

h->table= malloc(n*sizeof(*h));/*allocation de la table de hachage*/

for(i=0;i<n;i++)
{
h->table[i]=creer_liste();/*chaque liste pointe vers le noeud NULL*/
}
return h;/*on retourne la structure de donnee allouee*/
}


merci je compte sur vous enormement
Configuration: Windows Vista
Internet Explorer 7.0

1 réponse

  • Votes
  • Date
  • Date décroissante