filtrage htable + affichage
bonjour,
j'ai un problemes pour afficher une seule fois les element dans un tmpstr ( chaine de caracteres) .
voila le code que j'utilise pour afficher les elements :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
char *tmpStr = NULL;
ght_iterator_t iterator_param;
void *param_key = NULL;
void *param_key1 = NULL;
ght_hash_table_t *tmpHash = NULL;
tmpHash = inp_hash_table;
for (tmpStr = (char *) ght_first(tmpHash, &iterator_param, ¶m_key); (char *) tmpStr != NULL;
tmpStr = (char *) ght_next(tmpHash, &iterator_param, ¶m_key))
{
if ( (char *) param_key == NULL )
continue;
(void) printf("%s\n",param_key);
}
}
return tableFieldList; |
je veux afficher si le param_key ne se repete l'afficher une seule fois dans le printf.
Merci pour votre aide.