Bonjour,
Je veux créer un tableau de liste chainée.
voici mon code:
je voulais savoir est-ce que ma création et inialisation sont exactes ou non?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 ypedef struct Thash{ //noeud de la liste de la table de hachage char* id; char* kmer; unsigned int position; struct Thash * next; }Thash_t; Thash_t ** CreerTable(unsigned int nbEntrees) { unsigned int i=0; Thash_t **TThash = (Thash_t**)malloc(nbEntrees * sizeof(Thash_t*)); for(i=0;i<nbEntrees;i++) { TThash[i]=NULL; } return TThash; } int main() { Thash_t** TThash=CreerTable(lenght); }
ou est-il possible d'utiliser un seul pointeur et non pas un double pointeur?
Merci pour vos réponse
Partager